{ "id": "94213", "key": "AC-2929", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-08-20T10:35:47.000+0000", "created": "2012-07-01T11:30:23.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:47:54.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "On iOS the filepath for local asserts is relative to / but on Android the file:///android_asset/Resource prefix is required. Note that file:/// alone does not work.\r\n\r\nIf there is no fix then please document.\r\nIs suspect the default baseurl needs to be set for android\r\n\r\n{code}\r\n var win = Ti.UI.createWindow({title: 'Title'});\r\n \r\n var webview = Ti.UI.createWebView({\r\n borderRadius : 4,\r\n width : '100%', height : '100%',\r\n top : 0,\r\n backgroundColor:'white',\r\n scalesPageToFit:true,\r\n touchEnabled: true,\r\n });\r\n\r\n \r\n // Webview don't know about retina displays so fix with conditional\r\n var img_path = (Ti.Platform.displayCaps.dpi <300) ? '/img2x.png' : '/img.png';\r\n if(_platform==='android') img_path = 'file:///android_asset/Resources' + img_path;\r\n \r\n webview.html = '';\r\n win.add(webview);\r\n win.open()\r\n{code}", "attachment": [], "flagged": false, "summary": "Webview image source parity between iOS an Android", "creator": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "environment": "iOS simulator and iPad 5.0\r\nSamsung SIII\r\nSDK 2.0.2 and 2.1.0", "comment": { "comments": [ { "id": "201373", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just 'img_path = img.png' works fine for both Android and iOS. Please test it with latest mobile SDK.\r\n\r\nRegards,\r\nAnirudh", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-03T12:30:19.000+0000", "updated": "2012-07-03T12:30:19.000+0000" }, { "id": "285980", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing this since this issue can't be reproduced and the reporter has not got back to us since filing the issue.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-27T19:39:41.000+0000", "updated": "2013-12-27T19:39:41.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }