{ "id": "63546", "key": "TIMOB-2914", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "11239", "name": "Release 1.6.0 M06", "archived": true, "released": true, "releaseDate": "2011-01-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T02:00:26.000+0000", "created": "2011-04-15T03:32:47.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect", "intent", "release-1.6.0", "reported-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T02:00:26.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": "{html}
We're using set setData and setType for the data/type coming\nfrom the proxy, but each of they overwrite each other. If you have\nboth data and type you're supposed to call setDataAndType.
(from [0db802484cf4abc6b3a473c228e8f527667c8597])\nsetData() and setType() are mutually exclusive in the Intent API,\nwe need to call setDataAndType() when both are supplied in the
\nIntent proxy. Use the system's external storage API instead of
\nhardcoding \"/sdcard\" [#2914 state:fixed-in-qa] [#2915\nstate:fixed-in-qa]
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/0db802484cf4...
Tested by using a PDF View intent:
\n\n\nvar xhr = Ti.Network.createHTTPClient();\nxhr.onload = function() {\n var f = Ti.Filesystem.getFile(\"appdata://test.pdf\");\n f.write(this.responseData);\n var intent = Ti.Android.createIntent({\n action: Ti.Android.ACTION_VIEW,\n type: 'application/pdf',\n data: f.getNativePath()\n });\n Ti.Android.currentActivity.startActivity(intent);\n};\n\nxhr.open(\"GET\", \"http://www.appcelerator.com/assets/The_iPad_App_Wave.pdf\");\nxhr.send();
\n
verified droid2 2.2