{ "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.

{html}", "attachment": [], "flagged": false, "summary": "Android: Intent data and type aren't correctly set", "creator": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129696", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(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...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:48.000+0000", "updated": "2011-04-15T03:32:48.000+0000" }, { "id": "129697", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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
{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:48.000+0000", "updated": "2011-04-15T03:32:48.000+0000" }, { "id": "129698", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

verified droid2 2.2

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:32:48.000+0000", "updated": "2011-04-15T03:32:48.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }