{ "id": "155125", "key": "TIMOB-20459", "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": "18928", "name": "Release 6.0.2", "archived": false, "released": true, "releaseDate": "2017-02-27" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-15T17:39:38.000+0000", "created": "2016-02-25T09:26:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "issuelinks": [ { "id": "50723", "type": { "id": "10011", "name": "Includes", "inward": "is included by", "outward": "includes" }, "inwardIssue": { "id": "155237", "key": "TIMOB-20490", "fields": { "summary": "Android: Apps should be able to open/resume and respond to intents", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52656", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "155282", "key": "TIMOB-20502", "fields": { "summary": "Using Android shortcut to start new activity fails to detect Alloy.", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "54570", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "166661", "key": "TIMOB-24497", "fields": { "summary": "Android: Resuming app from intent does not provide EXTRA", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "50721", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "119016", "key": "TIMOB-15253", "fields": { "summary": "Android: singleTask launchMode with HeavyWeight window hangs after 1st launch", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52875", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "163585", "key": "TIMOB-23969", "fields": { "summary": "Android: Exiting an app by pressing back prevents the app from being resumed", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "50695", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "151730", "key": "TIMOB-19679", "fields": { "summary": "Android: Added additional type support for IntentProxy", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-17T15:13:06.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": "With TIMOB-19679 users can now create additional launcher shortcuts. If the app is already open in the background, you should be able to listen to the {{newintent}} to be notified. However, it seems that this even does not work. This not only makes this new addition less useful, it might hurts other use cases where a running app needs to know if it was brought to the foreground with a specific intent, like when using URL schemes.\r\n\r\nThe following sample demonstrates:\r\n\r\n# Run the app\r\n# Press the button to create a launcher shortcut\r\n# Force quit the app\r\n# Use the shortcut (named _Gallery_) to open the app\r\n# Confirm it logs _LAUNCH INTENT .. WITH EXTRA: gallery_ as expected (/)\r\n# Move the app to the background\r\n# Use the shortcut again\r\n# Confirm it does *not* log _NEW INTENT .. WITH EXTRA: gallery_ as expected (x)\r\n\r\n*tiapp.xml*\r\n\r\n{code:xml}\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n{code}\r\n\r\n*app.js*\r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n layout: 'vertical'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Create Shortcut'\r\n});\r\n\r\nbtn.addEventListener('click', function(e) {\r\n var currentIntent = Ti.Android.currentActivity.getIntent();\r\n currentIntent.setAction(Ti.Android.ACTION_MAIN);\r\n\r\n // Add custom metadata to read when your App is launched from the shortcut.\r\n currentIntent.putExtra(\"shortcut\", \"gallery\");\r\n\r\n // Create an Intent\r\n var shortcutIntent = Ti.Android.createIntent({\r\n action: \"com.android.launcher.action.INSTALL_SHORTCUT\",\r\n });\r\n\r\n // Title that will appear with the shortcut\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_NAME, \"Gallery\");\r\n\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_INTENT, currentIntent);\r\n shortcutIntent.putExtra(\"duplicate\", false);\r\n\r\n // Set the icon for the shortcut\r\n var iconImage = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"appicon.png\").read();\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_ICON, iconImage);\r\n\r\n // Adds the shortcut to the home screen.\r\n Ti.Android.currentActivity.sendBroadcast(shortcutIntent);\r\n});\r\n\r\nwin.add(btn);\r\n\r\nwin.add(Ti.UI.createLabel({\r\n top: 10,\r\n text: 'LAUNCH INTENT ' + JSON.stringify(Ti.Android.currentActivity.getIntent()) + ' WITH EXTRA: ' + Ti.Android.currentActivity.getIntent().getStringExtra('shortcut')\r\n}));\r\n\r\nTi.Android.currentActivity.addEventListener('newintent', function(e) {\r\n\r\n win.add(Ti.UI.createLabel({\r\n top: 10,\r\n text: 'NEW INTENT ' + JSON.stringify(e.intent) + ' WITH EXTRA: ' + e.intent.getStringExtra('shortcut')\r\n }));\r\n\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "61223", "filename": "testcase.gif", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-09T22:05:31.000+0000", "size": 1509765, "mimeType": "image/gif" } ], "flagged": false, "summary": "Android newintent event not fired", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 5.2.0", "closedSprints": [ { "id": 796, "state": "closed", "name": "2017 Sprint 02 SDK", "startDate": "2017-01-15T00:00:41.845Z", "endDate": "2017-01-29T00:00:00.000Z", "completeDate": "2017-01-30T21:10:44.640Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "377861", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "/cc [~msamah] [~jasonkneen] [~CollinPrice]", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-02-25T09:27:19.000+0000", "updated": "2016-02-25T09:27:19.000+0000" }, { "id": "377962", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~fokkezb] The sample app.js is how you'll except it to work? Just want to check with you.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-02-26T06:36:35.000+0000", "updated": "2016-02-26T06:36:35.000+0000" }, { "id": "377964", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~msamah], sorry forgot the steps. Added them now.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-02-26T06:58:19.000+0000", "updated": "2016-02-26T06:58:19.000+0000" }, { "id": "377968", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Thank you!", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-02-26T07:17:44.000+0000", "updated": "2016-02-26T07:17:44.000+0000" }, { "id": "378107", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~fokkezb] Do you have a sample app.js of when newintent will fire on android in a normal situation?\r\n\r\nI'm looking at android docs http://developer.android.com/guide/components/tasks-and-back-stack.html and it seems that onNewIntent is fired when the flags `FLAG_ACTIVITY_SINGLE_TOP` or `FLAG_ACTIVITY_NEW_TASK` is used to create an activity.\r\n\r\nIf the activity does not have those flags, it should be expected to not fire `newintent`.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-02-29T05:03:24.000+0000", "updated": "2016-02-29T05:16:53.000+0000" }, { "id": "378124", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Well, I added that flag here:\r\nhttps://github.com/appcelerator-developer-relations/appc-sample-ti520/blob/master/app/controllers/android/launcher.js#L28\r\n\r\nVia:\r\n\r\n{code:js}\r\nintentForShortcut.addFlags(Ti.Android.FLAG_ACTIVITY_SINGLE_TOP);\r\n{code}\r\n\r\nBut then still it does not fire the event.\r\n\r\nIn the end the question is... how *do* we pick up on the app being \"resumed\" by an intent?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-02-29T08:04:21.000+0000", "updated": "2016-02-29T08:04:21.000+0000" }, { "id": "378224", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "I took a dive into this more and checked out how onNewIntent is being called on Android natively. android:launchMode=\"singleTask\" in the manifest will allow `onNewIntent` to be called.\r\n\r\nWhen I edited the tiapp.xml manifest as described by TIMOB-15253 to get `singleTask` working, OnNewIntent is indeed called BUT with that, it comes with the bug originally mentioned in TIMOB-15253 where you get a blank activity. It seems that newIntent has not really working well since `singleTask` is not working correctly.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-03-01T04:06:08.000+0000", "updated": "2016-03-01T04:22:17.000+0000" }, { "id": "378252", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~msamah] thanks for diving in. I think we should look at this in the broader context of a (user) story instead of from a bug POV like this ticket and TIMOB-15253.\r\n\r\nIn the end, what the user wants is for the app (either running or not) to be able to respond to an incoming intent of any sort, including being opened via an URL scheme.\r\n\r\nWe also probably need to revise {{Ti.Android.currentActivity}} as since we now have \"heavy-weight\" windows that is probably just as useless as {{Ti.UI.currentWindow}} after getting rid of the {{url}} property and switching to CommonJS modules.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-03-01T09:15:06.000+0000", "updated": "2016-03-01T09:15:06.000+0000" }, { "id": "378254", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "{quote}In the end, what the user wants is for the app (either running or not) to be able to respond to an incoming intent of any sort, including being opened via an URL scheme.{quote}\r\n\r\nIf a method/pattern/coding way comes to mind on how else this can be achieved (incoming intent), do let me know. I understand that looking it from a story point of view is more important sometimes. I'll try to also see if this is possible with other ways or if we can do it another way.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-03-01T09:21:16.000+0000", "updated": "2016-03-01T09:21:16.000+0000" }, { "id": "378258", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I created TIMOB-20490 to talk about this from the user POV.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-03-01T09:36:51.000+0000", "updated": "2016-03-01T09:36:51.000+0000" }, { "id": "378405", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Super detailed ticket. I like it. (y)", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-03-02T02:28:48.000+0000", "updated": "2016-03-02T02:28:48.000+0000" }, { "id": "382064", "author": { "name": "ssx", "key": "ssx", "displayName": "Scott Wilcox", "active": true, "timeZone": "Europe/London" }, "body": "I spoke to @fokkez about this via Twitter and tested going back a few SDK's as I was having issues firing a share intent.\r\n\r\nIn 5.2.0, I could repeatedly fire new intents, however this appears to have broke in 5.2.1 and 5.2.2.\r\n\r\n", "updateAuthor": { "name": "ssx", "key": "ssx", "displayName": "Scott Wilcox", "active": true, "timeZone": "Europe/London" }, "created": "2016-04-07T11:12:31.000+0000", "updated": "2016-04-07T11:15:57.000+0000" }, { "id": "382071", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~ssx] Could you share the sample code that you are using for this?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-07T13:53:30.000+0000", "updated": "2016-04-07T13:53:30.000+0000" }, { "id": "382072", "author": { "name": "ssx", "key": "ssx", "displayName": "Scott Wilcox", "active": true, "timeZone": "Europe/London" }, "body": "Sure, very simply:\r\n\r\n\r\n{noformat}\r\n// file is a Ti.Filesystem.File ref\r\nvar intent = Ti.Android.createIntent({\r\n action: Ti.Android.ACTION_SEND\r\n});\r\nintent.putExtraUri(Ti.Android.EXTRA_STREAM, file.nativePath);\r\nvar share = Ti.Android.createIntentChooser(intent, 'Send File');\r\nTi.Android.currentActivity.startActivity(share);\r\n{noformat}\r\n\r\n\r\nThis would fire fine after install, as soon as the app is closed it wouldn't fire again past that point, adding in some debug, I did notice that newintent came back empty if that's of any help.", "updateAuthor": { "name": "ssx", "key": "ssx", "displayName": "Scott Wilcox", "active": true, "timeZone": "Europe/London" }, "created": "2016-04-07T13:59:25.000+0000", "updated": "2016-04-07T14:01:26.000+0000" }, { "id": "387706", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mrahman] Can you/one of our team members please look into this and update ?", "updateAuthor": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-06T22:25:13.000+0000", "updated": "2016-06-06T22:25:13.000+0000" }, { "id": "388921", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Does anyone have any workaround for this, whether it be on the Titanium side or through Java in a module that's creating an intent?\r\n\r\nIf I'm understanding the issue correctly, this literally makes it impossible to properly open an app that's running in the background with a notification that has a payload. It seems crazy that no one is doing that which makes me think maybe there is a workaround. Any ideas are appreciated because it seems like the fix for this is not coming any time soon and this is critical functionality IMO.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-23T13:15:45.000+0000", "updated": "2016-06-23T13:15:45.000+0000" }, { "id": "388922", "author": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "body": "My team has tried all manner of workarounds with no success. Apparently Appcelerator only cares about Windows support now.", "updateAuthor": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "created": "2016-06-23T13:25:48.000+0000", "updated": "2016-06-23T13:25:48.000+0000" }, { "id": "388924", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Very, very sad to hear. A bug that renders a feature as important as notification support nearly useless should be top priority. \r\n\r\nI've been trying a lot of workarounds too with no luck :/", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-23T13:33:19.000+0000", "updated": "2016-06-23T13:33:47.000+0000" }, { "id": "388925", "author": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "body": "I agree. This bug makes shortcuts, notifications, and url launching impossible. The support team has said they should have a fix by September... :(", "updateAuthor": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "created": "2016-06-23T13:39:51.000+0000", "updated": "2016-06-23T13:39:51.000+0000" }, { "id": "388948", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the info. That's a really long time for something this serious. Not good.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-23T19:07:26.000+0000", "updated": "2016-06-23T19:07:26.000+0000" }, { "id": "388984", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~dfoxinator] Just want to understand, is it the newintent event not firing that is of your concern?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-24T01:24:51.000+0000", "updated": "2016-06-24T01:24:51.000+0000" }, { "id": "388996", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@msamah yes, the newintent not firing makes it impossible to actually detect when an Android app that is in the background is opened from a push notification. Because of this, various GCM plugins are using a hacky/unreliable/broken method of looking at the \"last notification to arrive\" when the app comes into focus which is the complete wrong way to do it and results in broken behavior. ", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-24T02:17:20.000+0000", "updated": "2016-06-24T02:39:38.000+0000" }, { "id": "388998", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "And just to clarify, that's because the notification launcher intent can't actually pass data into the app. You can send the data in the extra field, but there's no way to actually get that info in Titanium because the new intent listener doesn't work.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-24T02:41:03.000+0000", "updated": "2016-06-24T02:41:03.000+0000" }, { "id": "389974", "author": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "body": "Is this bug ever going to get fixed? I keep seeing the scheduled release get bumped. 5.2.1 > 6.0.0 > 6.1.0", "updateAuthor": { "name": "CollinPrice", "key": "collinprice", "displayName": "Collin Price", "active": true, "timeZone": "America/Toronto" }, "created": "2016-07-06T15:46:25.000+0000", "updated": "2016-07-06T15:46:25.000+0000" }, { "id": "389998", "author": { "name": "bearus", "key": "bearus", "displayName": "Be Rushton", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Yeah come on guys this is critical functionality.", "updateAuthor": { "name": "bearus", "key": "bearus", "displayName": "Be Rushton", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-07-06T22:23:07.000+0000", "updated": "2016-07-06T22:23:07.000+0000" }, { "id": "389999", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I agree with the above comments. Unfortunately, because of this bug/issue, I've had to plan to move my app off of Appcelerator entirely.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-06T22:30:51.000+0000", "updated": "2016-07-06T22:30:51.000+0000" }, { "id": "391012", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "body": "[~cng], Could you please have a look at the response customer provided in above comments i have added?\r\n\r\nThanks\r\nNeeraj", "updateAuthor": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-07-19T16:52:45.000+0000", "updated": "2016-07-19T16:52:45.000+0000" }, { "id": "393869", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any update on this?", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-08-22T23:09:27.000+0000", "updated": "2016-08-22T23:09:27.000+0000" }, { "id": "394976", "author": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~dfoxinator] Have you tried setting `android:launchMode=\"singleTask\"`? I was able to implement URL Schemes by setting this and by following the workaround suggested in TIMOB-15253.\r\n\r\nThe `newIntent` event is fired when the app is in `singleTask` mode.", "updateAuthor": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-01T00:45:33.000+0000", "updated": "2016-09-01T03:11:33.000+0000" }, { "id": "394984", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~abdielou] Could you elaborate more on what you did?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-01T02:58:06.000+0000", "updated": "2016-09-01T02:58:06.000+0000" }, { "id": "395001", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the suggestion. I was never able to get singleTask mode to work properly. I just got the black screen every time after I tried to open the app again, like some commenters on that ticket described.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-01T03:06:31.000+0000", "updated": "2016-09-01T03:06:31.000+0000" }, { "id": "395003", "author": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In order to fire the {{newIntent}} event I added the {{android:launchMode=\"singleTask\"}} property to the activity on *tiapp.xml*.\r\n\r\nThen on {{alloy.js}} I added the {{newIntent}} event handler:\r\n\r\n{code:java}\r\nTi.Android.currentActivity.addEventListener(\"newIntent\", function(e){\r\n // Grab the intent data and do something with it\r\n var theIntentData = e.intent.data;\r\n // Re-create index as suggested at TIMOB-15253\r\n Alloy.createController('index');\r\n});\r\n{code}\r\n", "updateAuthor": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-01T03:09:11.000+0000", "updated": "2016-09-01T03:11:12.000+0000" }, { "id": "395041", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-01T09:21:23.000+0000", "updated": "2016-09-01T09:21:23.000+0000" }, { "id": "395108", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there any way to implement a similar workaround if you're not using Alloy?", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-01T16:19:38.000+0000", "updated": "2016-09-01T16:19:38.000+0000" }, { "id": "395366", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-06T05:21:26.000+0000", "updated": "2016-09-06T05:21:26.000+0000" }, { "id": "395464", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ashraf - thanks for the heads up. That looks very promising. I've never built the mobile SDK from the source, so I'll have to figure out how to do that and then I will test it. Is it possible it will be available soon in a CI build on builds.appcelerator.com? Thanks.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-07T01:51:01.000+0000", "updated": "2016-09-07T01:51:01.000+0000" }, { "id": "395465", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "It's currently on a branch that's in my forked repo. Thus not on CI (yet). For now, best way to test it is to build it from source. Let me know if you need more info on building from source. The guides should be available in the docs/wiki. There's also some changes in compiling for TiSDK 6+, refer to [https://github.com/appcelerator/titanium_mobile/blob/5a4a616857ed390f5aabd4e89dad794f6a6b6a8c/README.md#building-locally] for more info.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-07T02:19:55.000+0000", "updated": "2016-09-07T02:56:06.000+0000" }, { "id": "395816", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Ashraf,\r\n\r\nThanks for the info. I just tried to build the SDK, and I keep getting this error on the \"node scons.js build\" step of the process:\r\n\r\n{ Error: ENOENT: no such file or directory, lstat '/Users/DFox/Downloads/titanium_mobile-TIMOB-20490a/dist/android/titanium.jar'\r\n at Error (native)\r\n errno: -2,\r\n code: 'ENOENT',\r\n syscall: 'lstat',\r\n path: '/Users/DFox/Downloads/titanium_mobile-TIMOB-20490a/dist/android/titanium.jar' }\r\n\r\nAny help is appreciated.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-11T04:25:33.000+0000", "updated": "2016-09-11T04:25:33.000+0000" }, { "id": "395817", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I finally got it compiled and installed. I will test it in the next day or too and report back.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-11T06:04:20.000+0000", "updated": "2016-09-11T06:04:20.000+0000" }, { "id": "395972", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~dfoxinator] Glad you are able to compile it correctly.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-13T02:45:29.000+0000", "updated": "2016-09-13T02:45:29.000+0000" }, { "id": "397304", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8433", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-26T19:01:32.000+0000", "updated": "2016-09-26T19:01:32.000+0000" }, { "id": "398019", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~gmathews] please backport this.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-03T23:08:19.000+0000", "updated": "2016-10-03T23:08:19.000+0000" }, { "id": "398196", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\n{{newintent}} event is fired successfully.\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.8.0.201609292239\r\nTi SDK : 6.0.0.v20161005072811, 6.1.0.v20161005041716\r\nTi CLI : 5.0.10\r\nAlloy : 1.9.2\r\nMAC El Capitan : 10.11.6\r\nAppc NPM : 4.2.8-7\r\nAppc CLI : 6.0.0-56\r\nNode: 4.4.4\r\nNexus 6 - Android 6.0.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-05T23:55:19.000+0000", "updated": "2016-10-05T23:55:19.000+0000" }, { "id": "398240", "author": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've retested using sample code and came to a conclusion that this fix is incomplete. Here are my test scenarios: \r\n\r\nScenario 1\r\n------------------------------\r\n - Launch app normally. \r\n - Observe that LAUNCH INTENT and NEW INTENT were thrown WITH EXTRA : \"null\"\r\n - Create shortcut \r\n - Pause an app\r\n - Resume from shortcut\r\n - Observe that WITH EXTRA value is still \"null\" for both LAUNCH INTENT and NEW INTENT\r\n\r\nScenario 2\r\n------------------------------\r\n- Launch app normally\r\n- Create shortcut\r\n- Kill the app\r\n- Re-open the app using shortcut\r\n- Observe that LAUNCH INTENT and NEW INTENT were thrown WITH EXTRA : \"gallery\"\r\n- Pause an app\r\n- Resume an app from app icon (not shortcut)\r\n- Observe that WITH EXTRA value is still \"gallery\" for both LAUNCH INTENT and NEW INTENT\r\n\r\nTherefore, it is currently not possible to distinguish whether an app has been resumed from shortcut or not. \r\n\r\nTested with: \r\n\r\nTi SDK: 6.1.0.v20161003212029\r\nTi.CLI: 5.0.9\r\nDevice: Samsuns S6 - Android 6.0.1\r\n ", "updateAuthor": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-06T14:18:00.000+0000", "updated": "2016-10-06T14:18:00.000+0000" }, { "id": "398277", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~gmathews], Please see the last comment from the client. As per them, this is still an issue. Can you please take a look ?", "updateAuthor": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-06T18:31:40.000+0000", "updated": "2016-10-06T18:31:40.000+0000" }, { "id": "398579", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~nradaev] [~arohini] Try setting this flag under {{setAction}}\r\n\r\n{code:js}\r\ncurrentIntent.setFlags(Ti.Android.FLAG_UPDATE_CURRENT);\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-11T09:29:08.000+0000", "updated": "2016-10-11T09:29:23.000+0000" }, { "id": "398615", "author": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Gary, \r\n\r\nI've run sample code using: \r\n\r\ncurrentIntent.setFlags(Ti.Android.FLAG_UPDATE_CURRENT);\r\n\r\nIt does not work how we expect. Extra instances of the app are being created intead of resuming app with new intent.\r\n\r\nI’ve compiled a small Android app example that shows exact functionality we require. Note when the app is started/resumed from shortcut resulting text is “On Create/New Intent Started from shortcut”. Similarly when app is started/resumed from app icon resulting text is “On Create/New Intent null”. \r\n\r\nI've emailed a copy of the sample app to Ajith.", "updateAuthor": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-11T19:24:36.000+0000", "updated": "2016-10-11T19:27:35.000+0000" }, { "id": "399326", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi guys ! Any update here ?", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-19T00:12:51.000+0000", "updated": "2016-10-19T00:12:51.000+0000" }, { "id": "404308", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8733", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-09T21:48:12.000+0000", "updated": "2017-01-09T21:48:12.000+0000" }, { "id": "404949", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening for back port", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-20T17:41:58.000+0000", "updated": "2017-01-20T17:41:58.000+0000" }, { "id": "404963", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested 20th january 2017:\r\n\r\nAfter creating a new classic app with environment:\r\nMacOS:10.12.1\r\nXCODE: 8.2.1 GM (golden master)\r\nAPPC CLI Core: 6.1.0\r\nAPPC CLI NPM: 4.2.8\r\nSDK: 6.1.0.v20170118152304\r\nStudio build: 4.8.1.201612050850\r\nNPM: 2.15.9\r\nNode: 4.5.0\r\n\r\nSteps:\r\n\r\n1) Copy the tiapp.xml from the description\r\n\r\nand the app.js:\r\n\r\n\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n layout: 'vertical'\r\n }),\r\n bar = Ti.UI.createView({\r\n layout: 'horizontal',\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE\r\n })\r\n createShortcut = Ti.UI.createButton({\r\n title: 'CREATE SHORTCUT',\r\n left: 0\r\n }),\r\n clear = Ti.UI.createButton({\r\n title: 'CLEAR',\r\n right: 0\r\n }),\r\n scrollView = Ti.UI.createScrollView({\r\n layout: 'vertical',\r\n height: Ti.UI.FILL,\r\n backgroundColor: 'white'\r\n });\r\n\r\n// create homescreen shortcut\r\ncreateShortcut.addEventListener('click', function (e) {\r\n var currentIntent = Ti.Android.currentActivity.getIntent(),\r\n shortcutIntent = Ti.Android.createIntent({\r\n action: \"com.android.launcher.action.INSTALL_SHORTCUT\",\r\n });\r\n\r\n currentIntent.setAction(Ti.Android.ACTION_MAIN);\r\n currentIntent.putExtra(\"shortcut\", \"TEST\");\r\n currentIntent.addCategory(Ti.Android.CATEGORY_HOME);\r\n\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_NAME, \"SHORTCUT\");\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_INTENT, currentIntent);\r\n\r\n Ti.Android.currentActivity.sendBroadcast(shortcutIntent);\r\n});\r\n\r\n// clear intent log\r\nclear.addEventListener('click', function (e) {\r\n scrollView.removeAllChildren();\r\n});\r\n\r\n// intent listener\r\nTi.Android.currentActivity.addEventListener('newintent', function (e) {\r\n scrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'INTENT ' + JSON.stringify(e.intent) + ' WITH EXTRA: ' + e.intent.getStringExtra('shortcut')\r\n }));\r\n});\r\n\r\n// launch intent\r\nscrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'LAUNCH INTENT ' + JSON.stringify(Ti.Android.currentActivity.getIntent()) + ' WITH EXTRA: ' + Ti.Android.currentActivity.getIntent().getStringExtra('shortcut')\r\n}));\r\n\r\nbar.add([createShortcut, clear])\r\nwin.add([bar, scrollView]);\r\nwin.open();\r\n{code}\r\n\r\n\r\nStep 2) Build and Run application \r\nStep 3) Force quit the app\r\nStep 4) Use the shortcut (named Gallery) to open the app\r\nStep 5) Confirm it logs LAUNCH INTENT .. WITH EXTRA: gallery as expected \r\nStep 6) Move the app to the background\r\nStep 7) Use the shortcut again\r\nStep 8) Confirm it logs NEW INTENT .. WITH EXTRA: gallery as expected \r\n\r\nThis Ticket however will be kept open for the new release to make sure it still fixed!", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-20T18:22:06.000+0000", "updated": "2017-01-20T18:22:06.000+0000" }, { "id": "405067", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8776", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-23T14:19:38.000+0000", "updated": "2017-01-23T14:19:38.000+0000" }, { "id": "405102", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested 23th january 2017:\r\nAfter creating a new classic app with environment:\r\nMacOS:10.12.1\r\nXCODE: 8.2.1 GM (golden master)\r\nAPPC CLI Core: 6.1.0\r\nAPPC CLI NPM: 4.2.8\r\nSDK: 6.0.2.v20170123062940\r\nStudio build: 4.8.1.201612050850\r\nNPM: 2.15.9\r\nNode: 4.5.0\r\n\r\nStep 1) Copy the tiapp.xml from the description\r\nand the app.js:\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n layout: 'vertical'\r\n }),\r\n bar = Ti.UI.createView({\r\n layout: 'horizontal',\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE\r\n })\r\n createShortcut = Ti.UI.createButton({\r\n title: 'CREATE SHORTCUT',\r\n left: 0\r\n }),\r\n clear = Ti.UI.createButton({\r\n title: 'CLEAR',\r\n right: 0\r\n }),\r\n scrollView = Ti.UI.createScrollView({\r\n layout: 'vertical',\r\n height: Ti.UI.FILL,\r\n backgroundColor: 'white'\r\n });\r\n \r\n// create homescreen shortcut\r\ncreateShortcut.addEventListener('click', function (e) {\r\n var currentIntent = Ti.Android.currentActivity.getIntent(),\r\n shortcutIntent = Ti.Android.createIntent({\r\n action: \"com.android.launcher.action.INSTALL_SHORTCUT\",\r\n });\r\n \r\n currentIntent.setAction(Ti.Android.ACTION_MAIN);\r\n currentIntent.putExtra(\"shortcut\", \"TEST\");\r\n currentIntent.addCategory(Ti.Android.CATEGORY_HOME);\r\n \r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_NAME, \"SHORTCUT\");\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_INTENT, currentIntent);\r\n \r\n Ti.Android.currentActivity.sendBroadcast(shortcutIntent);\r\n});\r\n \r\n// clear intent log\r\nclear.addEventListener('click', function (e) {\r\n scrollView.removeAllChildren();\r\n});\r\n \r\n// intent listener\r\nTi.Android.currentActivity.addEventListener('newintent', function (e) {\r\n scrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'INTENT ' + JSON.stringify(e.intent) + ' WITH EXTRA: ' + e.intent.getStringExtra('shortcut')\r\n }));\r\n});\r\n \r\n// launch intent\r\nscrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'LAUNCH INTENT ' + JSON.stringify(Ti.Android.currentActivity.getIntent()) + ' WITH EXTRA: ' + Ti.Android.currentActivity.getIntent().getStringExtra('shortcut')\r\n}));\r\n \r\nbar.add([createShortcut, clear])\r\nwin.add([bar, scrollView]);\r\nwin.open();\r\n{code}\r\n\r\nStep 2) Build and Run the application :: on running the application find bellow the logs for the errors that occur for it.\r\n\r\n\r\n{code:java}\r\n[INFO] : DatabaseHelper: No value in database for platform key: 'hardware_machine_id' returning supplied default ''\r\n[WARN] : V8Object: (main) [376,406] Runtime disposed, cannot set property 'userAgent'\r\n[INFO] : TiApplication: (main) [29,435] Titanium Javascript runtime: v8\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.myapp.timob20459a.Timob204593Activity@2298f31\r\n[ERROR] : TiApplication: (main) [80,80] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.timob20459a/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: java.lang.Object[] cannot be cast to org.appcelerator.titanium.proxy.TiViewProxy; Titanium 6.0.2,2017/01/23 06:30,undefined\r\n[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.timob20459a/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: java.lang.Object[] cannot be cast to org.appcelerator.titanium.proxy.TiViewProxy\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.-wrap12(ActivityThread.java)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)\r\n[ERROR] : TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] : TiApplication: \tat android.os.Looper.loop(Looper.java:154)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:6119)\r\n[ERROR] : TiApplication: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)\r\n[ERROR] : TiApplication: Caused by: java.lang.ClassCastException: java.lang.Object[] cannot be cast to org.appcelerator.titanium.proxy.TiViewProxy\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.setActivity(TiViewProxy.java:1044)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:200)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:559)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:673)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:20)\r\n[ERROR] : TiApplication: \tat android.app.Activity.performCreate(Activity.java:6679)\r\n[ERROR] : TiApplication: \tat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)\r\n[ERROR] : TiApplication: \t... 9 more\r\n{code}\r\n\r\nI ran the application with the 6.1.0.v20170123100346 SDK and everything was ok\r\n\r\nI then had Lokesh verify this and he also got the same out come.\r\n\r\nFrom these findings I will re-open the ticket\r\n", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-23T21:27:42.000+0000", "updated": "2017-01-23T21:27:42.000+0000" }, { "id": "405106", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~awaldman] The test case passes a view array into {{bar.add(...)}} and {{win.add(...)}}, making use of this PR https://github.com/appcelerator/titanium_mobile/pull/8452\r\n\r\nWe can either, backport this feature into {{6.0.2}} or update the test case to not use this feature:\r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n layout: 'vertical'\r\n }),\r\n bar = Ti.UI.createView({\r\n layout: 'horizontal',\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE\r\n })\r\n createShortcut = Ti.UI.createButton({\r\n title: 'CREATE SHORTCUT',\r\n left: 0\r\n }),\r\n clear = Ti.UI.createButton({\r\n title: 'CLEAR',\r\n right: 0\r\n }),\r\n scrollView = Ti.UI.createScrollView({\r\n layout: 'vertical',\r\n height: Ti.UI.FILL,\r\n backgroundColor: 'white'\r\n });\r\n \r\n// create homescreen shortcut\r\ncreateShortcut.addEventListener('click', function (e) {\r\n var currentIntent = Ti.Android.currentActivity.getIntent(),\r\n shortcutIntent = Ti.Android.createIntent({\r\n action: \"com.android.launcher.action.INSTALL_SHORTCUT\",\r\n });\r\n \r\n currentIntent.setAction(Ti.Android.ACTION_MAIN);\r\n currentIntent.putExtra(\"shortcut\", \"TEST\");\r\n currentIntent.addCategory(Ti.Android.CATEGORY_HOME);\r\n \r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_NAME, \"SHORTCUT\");\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_INTENT, currentIntent);\r\n \r\n Ti.Android.currentActivity.sendBroadcast(shortcutIntent);\r\n});\r\n \r\n// clear intent log\r\nclear.addEventListener('click', function (e) {\r\n scrollView.removeAllChildren();\r\n});\r\n \r\n// intent listener\r\nTi.Android.currentActivity.addEventListener('newintent', function (e) {\r\n scrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'INTENT ' + JSON.stringify(e.intent) + ' WITH EXTRA: ' + e.intent.getStringExtra('shortcut')\r\n }));\r\n});\r\n \r\n// launch intent\r\nscrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'LAUNCH INTENT ' + JSON.stringify(Ti.Android.currentActivity.getIntent()) + ' WITH EXTRA: ' + Ti.Android.currentActivity.getIntent().getStringExtra('shortcut')\r\n}));\r\n \r\nbar.add(createShortcut);\r\nbar.add(clear);\r\nwin.add(bar);\r\nwin.add(scrollView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-23T22:10:36.000+0000", "updated": "2017-01-23T22:11:48.000+0000" }, { "id": "405107", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After testing using the app.js file :\r\n\r\n{code:java}\r\n\r\nvar win = Ti.UI.createWindow({\r\n layout: 'vertical'\r\n }),\r\n bar = Ti.UI.createView({\r\n layout: 'horizontal',\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE\r\n })\r\n createShortcut = Ti.UI.createButton({\r\n title: 'CREATE SHORTCUT',\r\n left: 0\r\n }),\r\n clear = Ti.UI.createButton({\r\n title: 'CLEAR',\r\n right: 0\r\n }),\r\n scrollView = Ti.UI.createScrollView({\r\n layout: 'vertical',\r\n height: Ti.UI.FILL,\r\n backgroundColor: 'white'\r\n });\r\n \r\n// create homescreen shortcut\r\ncreateShortcut.addEventListener('click', function (e) {\r\n var currentIntent = Ti.Android.currentActivity.getIntent(),\r\n shortcutIntent = Ti.Android.createIntent({\r\n action: \"com.android.launcher.action.INSTALL_SHORTCUT\",\r\n });\r\n \r\n currentIntent.setAction(Ti.Android.ACTION_MAIN);\r\n currentIntent.putExtra(\"shortcut\", \"TEST\");\r\n currentIntent.addCategory(Ti.Android.CATEGORY_HOME);\r\n \r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_NAME, \"SHORTCUT\");\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_INTENT, currentIntent);\r\n \r\n Ti.Android.currentActivity.sendBroadcast(shortcutIntent);\r\n});\r\n \r\n// clear intent log\r\nclear.addEventListener('click', function (e) {\r\n scrollView.removeAllChildren();\r\n});\r\n \r\n// intent listener\r\nTi.Android.currentActivity.addEventListener('newintent', function (e) {\r\n scrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'INTENT ' + JSON.stringify(e.intent) + ' WITH EXTRA: ' + e.intent.getStringExtra('shortcut')\r\n }));\r\n});\r\n \r\n// launch intent\r\nscrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'LAUNCH INTENT ' + JSON.stringify(Ti.Android.currentActivity.getIntent()) + ' WITH EXTRA: ' + Ti.Android.currentActivity.getIntent().getStringExtra('shortcut')\r\n}));\r\n \r\nbar.add(createShortcut);\r\nbar.add(clear);\r\nwin.add(bar);\r\nwin.add(scrollView);\r\nwin.open();\r\n{code}\r\n\r\nThe SDK: 6.0.2.v20170123062940\r\n\r\nWorks and so I will close this ticket \r\n\r\n[~gmathews]", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-23T22:21:13.000+0000", "updated": "2017-01-23T22:21:13.000+0000" }, { "id": "405306", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-25T20:37:37.000+0000", "updated": "2017-01-25T20:49:07.000+0000" }, { "id": "405506", "author": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested 27th january 2017:\r\nAfter creating a new classic app with environment:\r\nMacOS:10.12.1\r\nXCODE: 8.2.1 GM (golden master)\r\nAPPC CLI Core: 6.1.0\r\nAPPC CLI NPM: 4.2.8\r\nSDK: 6.0.2.v20170126173908\r\nStudio build: 4.8.1.201612050850\r\nNPM: 2.15.9\r\nNode: 4.5.0\r\nStep 1) Copy the tiapp.xml from the description\r\nand the app.js:\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n layout: 'vertical'\r\n }),\r\n bar = Ti.UI.createView({\r\n layout: 'horizontal',\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE\r\n })\r\n createShortcut = Ti.UI.createButton({\r\n title: 'CREATE SHORTCUT',\r\n left: 0\r\n }),\r\n clear = Ti.UI.createButton({\r\n title: 'CLEAR',\r\n right: 0\r\n }),\r\n scrollView = Ti.UI.createScrollView({\r\n layout: 'vertical',\r\n height: Ti.UI.FILL,\r\n backgroundColor: 'white'\r\n });\r\n \r\n// create homescreen shortcut\r\ncreateShortcut.addEventListener('click', function (e) {\r\n var currentIntent = Ti.Android.currentActivity.getIntent(),\r\n shortcutIntent = Ti.Android.createIntent({\r\n action: \"com.android.launcher.action.INSTALL_SHORTCUT\",\r\n });\r\n \r\n currentIntent.setAction(Ti.Android.ACTION_MAIN);\r\n currentIntent.putExtra(\"shortcut\", \"TEST\");\r\n currentIntent.addCategory(Ti.Android.CATEGORY_HOME);\r\n \r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_NAME, \"SHORTCUT\");\r\n shortcutIntent.putExtra(Ti.Android.EXTRA_SHORTCUT_INTENT, currentIntent);\r\n \r\n Ti.Android.currentActivity.sendBroadcast(shortcutIntent);\r\n});\r\n \r\n// clear intent log\r\nclear.addEventListener('click', function (e) {\r\n scrollView.removeAllChildren();\r\n});\r\n \r\n// intent listener\r\nTi.Android.currentActivity.addEventListener('newintent', function (e) {\r\n scrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'INTENT ' + JSON.stringify(e.intent) + ' WITH EXTRA: ' + e.intent.getStringExtra('shortcut')\r\n }));\r\n});\r\n \r\n// launch intent\r\nscrollView.add(Ti.UI.createLabel({\r\n top: 10,\r\n color: 'black',\r\n text: 'LAUNCH INTENT ' + JSON.stringify(Ti.Android.currentActivity.getIntent()) + ' WITH EXTRA: ' + Ti.Android.currentActivity.getIntent().getStringExtra('shortcut')\r\n}));\r\n \r\nbar.add(createShortcut);\r\nbar.add(clear);\r\nwin.add(bar);\r\nwin.add(scrollView);\r\nwin.open();\r\n{code}\r\n\r\n\r\ntiapp.xml add this ...: \r\n\r\n{code:java}\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n{code}\r\n\r\n\r\nStep 2) Build and Run application \r\nStep 3) Force quit the app\r\nStep 4) Use the shortcut (named Gallery) to open the app\r\nStep 5) Confirm it logs LAUNCH INTENT .. WITH EXTRA: gallery as expected \r\nStep 6) Move the app to the background\r\nStep 7) Use the shortcut again\r\nStep 8) Confirm it logs NEW INTENT .. WITH EXTRA: gallery as expected\r\n\r\nI can confirm this fix has worked with the latest build of the 6.0.2 SDK and so will close this ticket", "updateAuthor": { "name": "awaldman", "key": "awaldman", "displayName": "Andy Waldman", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-27T18:29:18.000+0000", "updated": "2017-01-27T18:29:18.000+0000" }, { "id": "408258", "author": { "name": "dakazmier", "key": "dakazmier", "displayName": "Michael Kazmier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have been testing this in 6.0.2.GA and I do not think this is working correctly. Let me explain quickly:\r\n\r\n1. Per the instructions, I have added the event listener and the debug statements.\r\n2. When we first launch the app, we get the correct newintent event and can see the extras we pass in.\r\n\r\n[DEBUG] [android, 6.0.1, 192.168.10.146] ----------------------------------- EVENT newintent -----------------------------------\r\n[DEBUG] [android, 6.0.1, 192.168.10.146] NEW INTENT {\"type\":null,\"packageName\":\"com.test.mobile\",\"className\":\"org.appcelerator.titanium.TiActivity\",\"action\":null,\"flags\":0,\"data\":null,\"apiName\":\"Ti.Android.Intent\",\"bubbleParent\":true} WITH EXTRA: com.kiloo.subwaysurf\r\n\r\n2. But if the is running in the background, and (using a different app) we fire a new activity/intent with different extras, we still get the newinitent event BUT we don't get the new extras:\r\n\r\n[DEBUG] [android, 6.0.1, 192.168.10.146] ----------------------------------- EVENT newintent -----------------------------------\r\n[DEBUG] [android, 6.0.1, 192.168.10.146] NEW INTENT {\"type\":null,\"packageName\":\"com.test.mobile\",\"className\":\"org.appcelerator.titanium.TiActivity\",\"action\":null,\"flags\":0,\"data\":null,\"apiName\":\"Ti.Android.Intent\",\"bubbleParent\":true} WITH EXTRA: null\r\n\r\n", "updateAuthor": { "name": "dakazmier", "key": "dakazmier", "displayName": "Michael Kazmier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-01T23:10:03.000+0000", "updated": "2017-03-01T23:10:03.000+0000" }, { "id": "412551", "author": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Why is this issue being closed? It clearly is not working. ", "updateAuthor": { "name": "nradaev", "key": "nradaev", "displayName": "Nikita Radaev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-15T17:49:10.000+0000", "updated": "2017-03-15T17:49:10.000+0000" }, { "id": "412554", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~nradaev] It was closed as part of the 6.0.2.GA release. All issues since then have to be handled in a new ticket to keep track of the release versions and QE-validations. The support team will create a new ticket after checking with our QE department.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-15T17:53:43.000+0000", "updated": "2017-03-15T17:53:43.000+0000" }, { "id": "412572", "author": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] Can you please post here the new ticket? I've been closely following this issue and would like to get notified once resolved.", "updateAuthor": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-15T18:16:36.000+0000", "updated": "2017-03-15T18:16:36.000+0000" } ], "maxResults": 77, "total": 77, "startAt": 0 } } }