{ "id": "117910", "key": "TIMOB-14746", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15695", "description": "2013 Sprint 20", "name": "2013 Sprint 20", "archived": true, "released": true, "releaseDate": "2013-10-04" }, { "id": "15696", "description": "2013 Sprint 20 API", "name": "2013 Sprint 20 API", "archived": true, "released": true, "releaseDate": "2013-10-04" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-04T22:45:09.000+0000", "created": "2013-08-02T04:11:22.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_android", "qe-testadded", "supportTeam" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [ { "id": "31278", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "117919", "key": "TIMOB-14749", "fields": { "summary": "iOS: Support HTML5 app cache (using manifest)", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2013-11-21T21:18:04.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h3. Description \r\nSupport for HTML5 app cache (using manifest) for Titanium's webview for Android.\r\n\r\nh3. Test case\r\n\r\nThe test case needs a client and a server. Once the files are created, follow these steps:\r\n\r\n# be sure the device is online, then open the app: you would see 2 images in the webview\r\n# turn off network on the device\r\n# hit reload in the app: only one image should be shown (the first) as it is the only one cached\r\n\r\n\r\nh3. Test code\r\n\r\nh4. Client side\r\napp.js\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar web = Ti.UI.createWebView({\r\n\turl: 'http://example.com/index.html',\r\n\tleft: 0,\r\n\tright: 0,\r\n\ttop: 0,\r\n\tbottom: 100\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: \"Refresh\",\r\n\tbottom: 0\r\n});\r\n\r\nbtn.addEventListener('click', function() {\r\n\tweb.reload();\r\n});\r\n\r\nwin.add(btn);\r\nwin.add(web);\r\nwin.open();\r\n{code}\r\n\r\nh4. Server side\r\n\r\nexample.manifest\r\n{code}\r\nCACHE MANIFEST\r\n# v1 - 2011-08-13\r\nhttp://example.com/index.html\r\nhttp://example.com/image.php\r\n{code}\r\n\r\nindex.html\r\n{code}\r\n\r\n\r\n\r\n\t\r\n\t\r\n\r\n\r\n{code}\r\n\r\nimage.php and imagenocache.php\r\n{code}\r\n