{ "id": "153756", "key": "ALOY-1343", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-03-07T22:44:23.000+0000", "created": "2015-12-10T11:57:05.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "batman", "key": "batman", "displayName": "Bruce Wayne", "active": true, "timeZone": "America/New_York" }, "updated": "2018-03-07T22:28:25.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": "12332", "name": "Titanium SDK", "description": "Any integration or issues with the TiSDK" } ], "description": "Hi.\r\n\r\n\r\nI'm having weird issue when trying to share file with my app. I used code from Ti docs and it works fine with classical Ti app, but when I try to use it with Alloy, app receives no file data. The problem can be seen if app is running, if app is shut down before sharing, it works fine.\r\n\r\n\r\nTo see this issue, download this zip file: https://drive.google.com/file/d/0B3_U6pYkC0P6andCTUdUdGFGZ1E/view?usp=sharing\r\n\r\nThere are two projects in there, one is classical Ti, the other is Alloy project. Run project and install app on device (ti build -p android -T device) and then try to share image with installed app (go to Photos app, press Share icon and pick installed app). Try to do the same with classical app. You'll see that, if installed app is put in the background, share does not work with Alloy app. And if you check out source code, you'll see code is virtually identical, therefore that should work in both cases.", "attachment": [], "flagged": false, "summary": "Android intent filter not receiving file data", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* Ti SDK 5.1.1.GA\r\n* Ti CLI 5.0.5\r\n* OSx 10.11.2\r\n* Android API level 23", "comment": { "comments": [ { "id": "372814", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~ivan.skugor], Use the below code for alloy\r\n\r\n{code}\r\nindex.js\r\n\r\nfunction oopen() {\r\n\tvar intent = Ti.Android.currentActivity.getIntent();\r\n\tvar iname = Ti.Android.EXTRA_STREAM;\r\n\tif (intent && intent.hasExtra(iname)) {\r\n\t\t// Create ImageView from TiBlob\r\n\t\tvar blob = intent.getBlobExtra(iname);\r\n\t\t$.win.add(Ti.UI.createImageView({\r\n\t\t\timage: blob,\r\n\t\t\theight: 300,\r\n\t\t\twidth: 300,\r\n\t\t\tleft: 0,\r\n\t\t\ttop: 0\r\n\t\t}));\r\n\t} else {\r\n\t\tTi.API.info('No extra named \"' + iname + '\" found in Intent ...');\r\n\t}\r\n};\r\n\r\n$.win.open();\r\n\r\n{code}\r\n\r\n{code}\r\nindex.xml\r\n\r\n\r\n\t\r\n\r\n\r\n{code}\r\n\r\nI have tested it and it works. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-12-14T09:35:33.000+0000", "updated": "2015-12-14T09:36:08.000+0000" }, { "id": "372817", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Hi Sharif AbuDarda.\r\n\r\nI tried your code but it doesn't work (tried on two Android devices and it doesn't work on both). Think you didn't follow steps to reproduce the issue. So, your app has to run, do not close it before trying to share image.\r\n\r\n1) Run app on device\r\n2) Minimise app so it runs in the background (don't push Back button to close it)\r\n3) Go to Photos app and try to share image", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-14T10:21:51.000+0000", "updated": "2015-12-14T10:22:38.000+0000" }, { "id": "409668", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "The Alloy example should be getting the intent of the root activity:\r\n{{var intent = Ti.App.Android.launchIntent;}}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-03-07T22:44:23.000+0000", "updated": "2017-03-07T22:44:23.000+0000" }, { "id": "435329", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If this is incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-07T22:28:25.000+0000", "updated": "2018-03-07T22:28:25.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }