{ "id": "119016", "key": "TIMOB-15253", "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": "19275", "description": "Patch release for 6.0.x regressions or important fixes", "name": "Release 6.0.3", "archived": false, "released": true, "releaseDate": "2017-03-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-29T18:46:12.000+0000", "created": "2013-08-26T08:57:50.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "heavyweight", "launchmode", "merge-6.0.3", "singletask" ], "versions": [], "issuelinks": [ { "id": "50724", "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": "50721", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "155125", "key": "TIMOB-20459", "fields": { "summary": "Android newintent event not fired", "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": "52658", "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": "57115", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171712", "key": "TIMOB-26075", "fields": { "summary": "Android: Refactor app resume and \"newintent\" handling", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "56319", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "170822", "key": "AC-5532", "fields": { "summary": "Open app via URL on Android", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52657", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "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 } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-11T03:37:20.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": "When launching your app with it's main activity set to {{android:launchMode=\"singleTask\"}} and it's main window a HeavyWeight one, it will hang on the second and every following launch.\r\n\r\nThis bug blocks me from allowing users to open my app by using an URL scheme on a webpage or in a email message, send to them when they lost their password, received an invite to play a game etc.\r\n\r\nh1. Why use launchMode?\r\n\r\nBy default, when launching your app via another app, e.g. using an URL scheme in the browser, your apps main activity will be stacked onto the current app's task. If your app was already running in the background, you will have 2 instances of the app running.\r\n\r\nAndroid has a [launchMode|http://developer.android.com/guide/topics/manifest/activity-element.html#lmode] attribute that allows you to instruct the OS to always open the activity as the root of a new task, using {{singleTask}} as value.\r\n\r\nThis works fine, but not when the app's main window is HeavyWeight, for example a {{Ti.UI.TabGroup}} or a {{Ti.UI.Window}} with {{modal:false}}.\r\n\r\nh1. To reproduce\r\n\r\n# Create a new project: {{titanium create -p android -n test}}\r\n# Build (only) to generate manifest: {{titanium build -b -p android}}\r\n# Open the generated {{build/android/AndroidManifest.xml}} and copy the first {{}} tree to the {{tiapp.xml}} under {{ti:app/android/manifest/application}}. You will need to create the empty {{}} and {{}} elements yourself.\r\n# Add {{android:launchMode=\"singleTask\"}} to the {{}} element and save {{tiapp.xml}}.\r\n# Build the app to the device: {{titanium build -p android -T device}}\r\n# Open the updated {{AndroidManifest.xml}} to confirm the only effective change is the newly added attribute.\r\n# Seeing the app properly launched on the device, move it to the background by clicking the device's home button.\r\n# Lookup the app on the device and launch it again. You'll see a black screen with a titlebar ({{test}}) only.\r\n# Now replace the app's {{app.js}} with a lightweight window instead of the default heavyweight tabgroup:\r\n {code}\r\n Ti.UI.createWindow({backgroundColor:'white'}).open();\r\n {code}\r\n# Repeat steps 5-8 and this time, the app will properly launch.", "attachment": [], "flagged": false, "summary": "Android: singleTask launchMode with HeavyWeight window hangs after 1st launch", "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 3.1.2.GA\r\nAndroid 4.1.2 on Samsung Galaxy S2\r\nMac OS X 10.8.4", "closedSprints": [ { "id": 129, "state": "closed", "name": "To Be Scheduled", "startDate": "2016-03-28T04:03:55.142Z", "endDate": "2016-04-08T04:03:00.000Z", "completeDate": "2016-03-29T04:09:03.755Z", "originBoardId": 100 }, { "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": "268111", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "For a use case see my blog at: http://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-26T14:45:50.000+0000", "updated": "2013-08-26T14:45:50.000+0000" }, { "id": "268550", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Update: Even if the main application window is light, opening any heavy window will cause the app to hang on a black screen the next time you launch it from the app list.\n\nPlease make this an urgent issue for 3.2 guys!", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-28T10:46:03.000+0000", "updated": "2013-08-28T10:46:03.000+0000" }, { "id": "268552", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Update: I think this is somehow related to the {{ti.android.bug2373.finishfalseroot}} (TIMOB-9285).\r\n\r\nI was working on a workaround that was binding the URL scheme to launch the app (which is the main use-case I need {{singleTask}} for) to a new activity/JS file like this:\r\n\r\n{code:xml}\t\r\n\t\t\r\n\t\t\t\r\n \r\n \r\n \r\n \r\n \r\n \r\n\t\t\t\r\n\t\t\r\n\t\r\n{code}\r\n\r\nIn the {{incoming.js}} I tried to launch the actual app by doing:\r\n\r\n{code:javascript}\r\nvar intent = Ti.Android.createIntent({\r\n action: Ti.Android.ACTION_MAIN,\r\n category: Ti.Android.CATEGORY_LAUNCHER,\r\n className: 'nl.fokkezb.test.scheme.TestActivity',\r\n packageName: 'nl.fokkezb.test.scheme'\r\n});\r\n \r\nTi.Android.currentActivity.startActivity(intent);\r\n{code}\r\n\r\nThis actually worked, but showed the {{An application restart is required}} message. So I added the {{ti.android.bug2373.finishfalseroot}} property to my {{tiapp.xml}}. And guess what? I got the exact same behavior described in the test case of this ticket: a black screen of death.\r\n\r\nHope this is of some help?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-28T11:36:10.000+0000", "updated": "2013-08-28T11:37:01.000+0000" }, { "id": "268553", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~ingo], any change we can have this fixed in 3.1.3?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-28T13:02:16.000+0000", "updated": "2013-08-28T13:02:16.000+0000" }, { "id": "271221", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi,\nCould you please provide test case.\nThanks,", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-09-16T10:14:21.000+0000", "updated": "2013-09-16T10:14:21.000+0000" }, { "id": "271228", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "The description already includes the steps to reproduce, under *Why use lauchMode* I explain why this should be fixed and at http://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/ I have a use case.\n\nWhat is it what you need more?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-16T10:47:33.000+0000", "updated": "2013-09-16T10:47:33.000+0000" }, { "id": "271897", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Ugly workaround is to launch the app using the [intent-based URI|https://developers.google.com/chrome/mobile/docs/intents] with the [FLAG_ACTIVITY_NEW_TASK|http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK] flag set:\r\n\r\n{code}\r\n\r\n{code}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-09-19T12:29:56.000+0000", "updated": "2013-09-19T12:29:56.000+0000" }, { "id": "274884", "author": { "name": "knice", "key": "knice", "displayName": "Romain", "active": true, "timeZone": "Europe/Berlin" }, "body": "Same issue for us. Really annoying :(", "updateAuthor": { "name": "knice", "key": "knice", "displayName": "Romain", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-10-12T00:29:58.000+0000", "updated": "2013-10-12T00:29:58.000+0000" }, { "id": "276843", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Unfortunately, we can't support the singleTask mode with the current Titanium architecture. When you background the app, and go back to it, the screen is black since the tab group activity gets destroyed. The singletask mode seems to destroy all other activity in the task, besides the activity that is marked as single task. This is a problem since we don't re-run the app.js code in this case (and we shouldn't since this is done as a part of the v8 runtime initialization).\r\n\r\nFokke actually pointed out a workaround which I have tested and seems to work well.\r\n\r\nInside the tiapp.xml of the 'singletask' app, you need to place the finishfalseroot flag.\r\n{code:xml}\r\ntrue\r\n{code}\r\n\r\nIn the other app that you want to launch the 'singletask' app, You need to do the following:\r\n\r\n{code:javascript}\r\nvar intent = Ti.Android.createIntent({\r\n action: Ti.Android.ACTION_MAIN,\r\n flags: Ti.Android.FLAG_ACTIVITY_NEW_TASK,\r\n category: Ti.Android.CATEGORY_LAUNCHER,\r\n className: \"com.mytest.MytestActivity\",\r\n packageName: \"com.mytest\"\r\n});\r\nTi.Android.currentActivity.startActivity(intent);\r\n{code}\r\n \r\nThe key here is to use the FLAG_ACTIVITY_NEW_TASK flag when launching the app with the finishfalseroot set to true.\r\n\r\nWe are actively working to make this a non-issue in the Ti.Next architecture.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-25T20:29:25.000+0000", "updated": "2013-10-25T20:30:31.000+0000" }, { "id": "276910", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I hate seeing this postponed to TiNext, but I understand why it has too.\r\n\r\nTo call the intent from an URL, you would have to attach a scheme to the activity and then use the {{#Intent}} anchor to add the same flag like this:\r\n\r\n{code}intent://#Intent;package=com.myTest;scheme=myScheme;launchFlags=268435456;end;{code}\r\n\r\nFor more details check my blog: http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-10-27T09:33:45.000+0000", "updated": "2013-10-27T09:34:24.000+0000" }, { "id": "354572", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "Is there a workaround for this that works in 4.0.x? ", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2015-06-08T16:10:24.000+0000", "updated": "2015-06-08T16:10:24.000+0000" }, { "id": "358209", "author": { "name": "wpccolorblind", "key": "wpccolorblind", "displayName": "josh rose", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Would very much like to see this fixed!", "updateAuthor": { "name": "wpccolorblind", "key": "wpccolorblind", "displayName": "josh rose", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-07-23T19:48:06.000+0000", "updated": "2015-07-23T19:48:06.000+0000" }, { "id": "364972", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I think it would be good if we'd test and fix the underlying results developers want to achieve:\r\n\r\n* Be able to launch the app from an email/browser using a URL or other data scheme without creating a second instance off the app in the current activity stack if the app is already open in another.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-25T06:14:47.000+0000", "updated": "2015-11-17T09:04:31.000+0000" }, { "id": "370456", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Behavior is expected for \"singleTask\". So the Titanium flow is something like this:\r\n{code}\r\nRoot activity -> first window/tabgroup -> second window, so on\r\n{code}\r\nWhen you assign the Root Activity as \"singleTask\" launch mode, your first launch would do:\r\nRoot activity -> first window/tabgroup (it works as expected)\r\nHowever, when you hit the home button, all activities after the root will be destroyed, so when the app is relaunched, only the root activity is shown. This result in the black window, cause the splash screen is now gone.\r\n\r\nThis used to work with Lightweight windows is because LW is actually a view on top of the Root Activity.\r\n\r\n\r\n", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-16T22:47:42.000+0000", "updated": "2015-11-20T19:40:29.000+0000" }, { "id": "370880", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I did some research and I don't think \"singleTask\" is a viable solution to this problem. This is because all activities but the one assigned with \"singleTask\" are destroyed when the app is resume. Even if we can make it work, the app would have to restart every time you background/foreground, which is not what we want. We would need to investigate further for other solutions.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-19T21:19:28.000+0000", "updated": "2015-11-20T19:40:41.000+0000" }, { "id": "370971", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "It's a long a time ago but I think we started using singleTask because:\r\n\r\n{quote}\r\nBy default, when launching your app via another app, e.g. using an URL scheme in the browser, your apps main activity will be stacked onto the current app's task. If your app was already running in the background, you will have 2 instances of the app running.\r\n{quote}\r\n\r\nSo in the end the ticket is not about {{singleTask}} but about the question:\r\n\r\n_How to to open a Titanium via a custom URL *AND* prevent multiple instances *AND* without requiring launch flags with the URL_", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-20T09:06:21.000+0000", "updated": "2015-11-20T09:06:37.000+0000" }, { "id": "374930", "author": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am currently struggling with the same (branch.io request that I have my launcher as single task), and I added an OnResume function onto the main (launcher) activity, in which I re-read my index.... so far so good, that seems to work. \r\nAnyone sees any problem with this approach?\r\n\r\nThis comes very early in my alloy.js :\r\n\r\n{code:javascript}\r\nif (OS_ANDROID)\r\n{\r\n\tfunction resumeLauncher() {Alloy.createController('index',{});}\r\n\tif (Ti.Android.currentActivity) {Ti.Android.currentActivity.setOnResume(resumeLauncher)}\r\n}\r\n{code}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-01-20T09:34:09.000+0000", "updated": "2016-01-22T08:51:34.000+0000" }, { "id": "375145", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~annakozy@direcciona.me] thanks for sharing that workaround!\r\n\r\n[~cng] if this works then it seems like when the app resumes in singleTask launchMode the existing activities (windows) are killed and [~annakozy@direcciona.me]'s code handles this by re-opening the index controller. Do you see any downsides? If not, then this might be documented as the official way to implement singleTask launchMode and we can support URL schemes on Android, jay!", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-01-22T08:55:53.000+0000", "updated": "2016-01-22T08:55:53.000+0000" }, { "id": "375177", "author": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, there is a problem, not so much with the workaround as with single task itself. \r\nIt indeed destroys all the activities above the one marked as single task, so maintaining the application state (other open windows) becomes a problem, including background audio. \r\n\r\nUpdate: I did more testing. No, it does not actually destroy anything when put into background, even audio keeps playing, it's FOREGROUNDING that creates problems. If you foreground it from the list of activities (on my phone it appears by pressing and holding home button), nothing happens. However if you restart the activity from the icon again, then the child activities are destroyed/restarted", "updateAuthor": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-01-22T20:19:04.000+0000", "updated": "2016-01-22T21:55:30.000+0000" }, { "id": "378259", "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:37:01.000+0000", "updated": "2016-03-01T09:37:01.000+0000" }, { "id": "378262", "author": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have read more about it, and to me it looks like a generic Android problem, not even really Appc-specific.... applies to any app where some activities are single task and others are not. \r\n\r\nI am using my workaround which is kinda working, but I am not really sure where to move from there. \r\n", "updateAuthor": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-01T09:52:35.000+0000", "updated": "2016-03-01T09:55:18.000+0000" }, { "id": "389247", "author": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried the workaround mentioned by [~annakozy@direcciona.me] and it works... but it makes my app unstable and crashes sporadically when resumed.\r\n\r\nWithout the workaround, resuming the app from a URL scheme freezes on the Splash screen.\r\n\r\nI followed [~fokkezb] article on implementing URL schemes. Any further suggestions?", "updateAuthor": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-28T13:27:29.000+0000", "updated": "2016-06-28T13:27:29.000+0000" }, { "id": "394518", "author": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "body": "I believe this bug is preventing full integration with Branch.io.", "updateAuthor": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "created": "2016-08-26T18:38:38.000+0000", "updated": "2016-08-26T18:38:38.000+0000" }, { "id": "394592", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "What exactly is needed for Branch.io?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-08-29T02:20:15.000+0000", "updated": "2016-08-29T02:20:15.000+0000" }, { "id": "395534", "author": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "updateAuthor": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-07T20:34:02.000+0000", "updated": "2016-09-07T20:34:02.000+0000" }, { "id": "395535", "author": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In the first place, if you dont use singleTask, and you already have your application open, you will have two or more instances of your application open when you launch it from Branch link.\r\n\r\nAs a user, you can see all those instances if you click that button to show the list of running apps on Android\r\n\r\nIt is confusing for the user and I also dont know if it might be confusing for Branch statistics in some way", "updateAuthor": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-07T20:41:30.000+0000", "updated": "2016-09-07T20:41:30.000+0000" }, { "id": "395538", "author": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just for the record.\r\n\r\nI still keep re-reading index controller. \r\nI did have to do some usual magic to make sure index.js knows it is being reopened (I send it a parameter in arguments like for any other controller), so that it does not add some listeners for the second time.\r\n\r\nIt's been rather stable except for some not frequent cases when it STILL gets stuck at launcher. \r\nBut this looks like the app fails to register onResume function with the launcher activity (Ti.Android.currentActivity must be something else at the beginning of alloy.js in this case - it often happens when I launch the app from Ti.Studio, but it works ok in normal workflow). \r\n\r\nSeparating launcher in a separate variable could help with this (so I can always add onResume for launcher)\r\n\r\nBut other than that and the typical bugs of duplicated Ti.App.addEventListener, I am fine", "updateAuthor": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-07T20:52:03.000+0000", "updated": "2016-09-07T20:52:03.000+0000" }, { "id": "395539", "author": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Its been since mid-january that we've been rather integrated with Branch and using single task\r\n\r\nIts not perfect (in testing environment, I can recreate some less-than-perfect behaviors), but this does not seem to cause many user complaints", "updateAuthor": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-07T20:59:12.000+0000", "updated": "2016-09-07T20:59:12.000+0000" }, { "id": "395540", "author": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Point is, I do not experience \"sporadic crashes\" documented earlier by someone when I am re-reading index controller, or any instability that cant be solved by usual measures of sorting things into \"must only do on cold start\" and \"can do always\" (the difference between those cases is easy to spot by passing a parameter into index, when you reopen it)", "updateAuthor": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-07T21:11:58.000+0000", "updated": "2016-09-07T21:11:58.000+0000" }, { "id": "395541", "author": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As a matter of fact, if we teach appcelerator developers to treat index.js like any other window.... most of the problem with singleTask will go away.\n\nThe problem is perhaps due to the programming style when people assume that index.js is only being read once and put a lot of unsafe stuff there (having listeners added and not removed, ignoring the usual cleanup etc.). \n\nEverything that cant be safely repeated should probably be ideally in alloy.js", "updateAuthor": { "name": "annakozy@direcciona.me", "key": "annakozy@direcciona.me", "displayName": "Ganna Kozynenko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-07T21:23:38.000+0000", "updated": "2016-09-07T21:23:38.000+0000" }, { "id": "404539", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8747", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-12T17:58:30.000+0000", "updated": "2017-01-12T17:58:30.000+0000" }, { "id": "408266", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did a check with the PR & found an issue. Commented about it in the PR.\r\nWill continue to test after the issue has been looked at.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-02T00:44:39.000+0000", "updated": "2017-03-02T00:44:39.000+0000" }, { "id": "408305", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "bump, i would appreciate this to be fixed soon since its an ongoing issue since 2013. I am too running into issues because I'm implementing push notifications and url schemes", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2017-03-02T12:46:20.000+0000", "updated": "2017-03-02T12:46:20.000+0000" }, { "id": "411172", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR merged.\r\nWaiting for build to close the ticket.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-10T02:11:50.000+0000", "updated": "2017-03-10T02:11:50.000+0000" }, { "id": "411174", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "If this fix is going in 6.0.3, when will 6.0.3 be released? We just ran into this issue for one of AppC's big clients - we are the dev shop. Should I open an enterprise support ticket or is this going out really soon?", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-10T03:13:11.000+0000", "updated": "2017-03-10T03:13:11.000+0000" }, { "id": "411202", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8879", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-10T16:07:20.000+0000", "updated": "2017-03-10T16:07:20.000+0000" }, { "id": "411254", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-10T18:34:00.000+0000", "updated": "2017-03-10T18:34:00.000+0000" }, { "id": "411342", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with SDK 6.1.0.v20170309181051. \r\nWaiting for 6.0.3 built to close the issue.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-10T19:42:47.000+0000", "updated": "2017-03-10T19:42:47.000+0000" }, { "id": "411364", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with SDK 6.0.3.v20170310122139.\r\nClosing the ticket.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-10T22:29:29.000+0000", "updated": "2017-03-10T22:29:29.000+0000" }, { "id": "415106", "author": { "name": "dakazmier", "key": "dakazmier", "displayName": "Michael Kazmier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi everyone,\r\n\r\nI recognize that this ticket is closed, but I am testing the functionality on 6.0.3.v20170322115949 and I still do not think this is working correctly. Let me provide a quick example. My app's main activity looks like this (from tiapp.xml):\r\n\r\n\r\n\r\ncom.kudoso.mobile.KudosoActivity\r\n\r\nNow, we have a service that runs that fires off a new intent with Extras when certain system events happen. Using SDK 6.x and either singleTop or singleTask mode, we correctly launch our app now (that is win!) BUT we are still losing the intent information. In our app, we log the new intent, and it is missing the extras, see here:\r\n\r\n[DEBUG] ----------------------------------- EVENT newintent -----------------------------------\r\n[DEBUG] NEW INTENT {\"type\":null,\"packageName\":\"com.kudoso.mobile\",\"className\":\"org.appcelerator.titanium.TiActivity\",\"action\":null,\"flags\":0,\"data\":null,\"apiName\":\"Ti.Android.Intent\",\"bubbleParent\":true} WITH EXTRA: null\r\n\r\nWhat is important to note is the class name of the intent! Our service fires off the intent as com.kudoso.mobile/com.kudoso.mobile.KudosoActivity but the app receives com.kudoso.mobile/org.appcelerator.titanium.TiActivity.\r\n\r\nWhy??? I cannot seem to track this down in the SDK.", "updateAuthor": { "name": "dakazmier", "key": "dakazmier", "displayName": "Michael Kazmier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T22:17:34.000+0000", "updated": "2017-03-22T22:17:34.000+0000" }, { "id": "415865", "author": { "name": "caioiglesias88", "key": "caioiglesias88", "displayName": "Caio Iglesias", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I still see it hanging as soon as the android:launchMode=\"singleTask\" flag is added, running on 6.0.3.GA.\r\nIt works on the first launch only. If the app was already running and you try opening a link, it hangs.\r\n", "updateAuthor": { "name": "caioiglesias88", "key": "caioiglesias88", "displayName": "Caio Iglesias", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2017-03-27T12:49:40.000+0000", "updated": "2017-03-27T12:49:40.000+0000" }, { "id": "415992", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "We are seeing the same issue with it only working on first launch using 6.0.3.GA. Please re-open this ticket.", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-28T14:46:36.000+0000", "updated": "2017-03-28T14:46:36.000+0000" }, { "id": "415994", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "Also I don't know if this makes a difference, but we are using Hyperloop as well.", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-28T14:59:33.000+0000", "updated": "2017-03-28T14:59:33.000+0000" }, { "id": "416067", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to investigate field reports. ", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-28T21:32:24.000+0000", "updated": "2017-03-28T21:32:24.000+0000" }, { "id": "416127", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated documentation and intent filter guide as part of https://github.com/appcelerator/titanium_mobile/pull/8897", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T12:14:37.000+0000", "updated": "2017-03-29T12:14:37.000+0000" }, { "id": "416145", "author": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "body": "I saw the documentation update in the most recent PR stating:\r\n\r\n\"Defining launch modes using `android:launchMode` is not supported by Titanium Android.\r\nHowever, `singleTask` behaviour can be accomplished when using [intent filters](http://docs.appcelerator.com/platform/latest/#!/guide/Android_Intent_Filters).\"\r\n\r\nIf we are responding to a custom scheme link initiated from the user's browser - how can we specify a true 'singleTask' launch of our application? I did not find any corresponding information for this in the linked-to documentation on intent-filter.\r\n\r\nIt works for us if our app is closed, but when our app is already open we get stuck at the splash screen.\r\n\r\nNote we have set this property as well, with no change in result:\r\n\r\n{noformat}\r\ntrue\r\n{noformat}\r\n", "updateAuthor": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-29T15:24:01.000+0000", "updated": "2017-03-29T16:02:47.000+0000" }, { "id": "416162", "author": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We have exactly the same situation as @jonesdhtx\r\n\r\nWe currently have our schemes disabled for our Android users and enabled for our iOS users... not good at all.", "updateAuthor": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T16:18:32.000+0000", "updated": "2017-03-29T16:18:32.000+0000" }, { "id": "416226", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "I just saw that this issue was marked as resolved....what is the resolution for handling url schemes in Android? Are you opening another ticket for this? Do we need to open a new ticket?", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-29T18:52:34.000+0000", "updated": "2017-03-29T18:52:34.000+0000" }, { "id": "416227", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jonesdhtx] What Titanium SDK version are you using? Could you provide example code to reproduce the issue?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T19:13:06.000+0000", "updated": "2017-03-29T19:13:06.000+0000" }, { "id": "416231", "author": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "body": "Using 6.0.3.GA\r\n\r\nHere is some example code for showing the app is not getting launched as a new task for 2nd/subsequent invocations.\r\n\r\nReferring to the code below:\r\n1) In initial state, app not running - In the phone browser click on the link in the test html page \r\n2) App logs our custom message: \"Launched as New Task\" and opens successfully.\r\n3) Now leaving app open, return to the test html page, and click on the same link again\r\n4) App logs our custom message: \"Launched as Resumed/Recycled Task\" and the app ux shows only the splash screen\r\n\r\nTiapp.xml is setup as:\r\n\r\n{noformat}\r\n\r\n ...\r\n true\r\n true\r\n ...\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ...\r\n 6.0.3.GA\r\n \r\n ...\r\n ti.alloy\r\n hyperloop\r\n ...\r\n \r\n ...\r\n\r\n\r\n{noformat}\r\n\r\n\r\nCode from our top-level alloy controller: app/controllers/index.js to let us know if app is being started as new task or not:\r\n{noformat}\r\nif(Alloy.Globals.hasBeenPreviouslyLaunched) {\r\n console.log('Launched as Resumed/Recycled Task')\r\n}\r\nelse {\r\n console.log('Launched as New Task')\r\n Alloy.Globals.hasBeenPreviouslyLaunched = true;\r\n}\r\n{noformat}\r\n\r\nThe html test page used to launch the app:\r\n\r\n{noformat}\r\nLaunch App\r\n{noformat}\r\n", "updateAuthor": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-29T19:41:17.000+0000", "updated": "2017-03-29T19:54:07.000+0000" }, { "id": "416249", "author": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "resolved?\r\n\r\nkudos to [~jonesdhtx]", "updateAuthor": { "name": "abdielou", "key": "abdielou", "displayName": "Abdiel Aviles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T21:05:18.000+0000", "updated": "2017-03-29T21:06:02.000+0000" }, { "id": "416410", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "Can we get this ticket re-opened now that we have the test case from David? Our client has an enterprise support ticket that is tracking this jira issue, but if you decide to not reopen we will need to reference a new ticket.", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-31T01:35:48.000+0000", "updated": "2017-03-31T01:35:48.000+0000" }, { "id": "416715", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "request re-open. I cant seem to retrieve intent data now when resuming my app from background", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2017-04-04T09:09:35.000+0000", "updated": "2017-04-04T09:09:35.000+0000" }, { "id": "416716", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Please try https://github.com/appcelerator/titanium_mobile/pull/8897 (TIMOB-24316) for SDK Release 6.0.4.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-04-04T09:11:54.000+0000", "updated": "2017-04-04T09:11:54.000+0000" }, { "id": "416718", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "i guess this has to be built from source? Anyone able to provide a .zip?", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2017-04-04T09:24:23.000+0000", "updated": "2017-04-04T09:24:23.000+0000" }, { "id": "416731", "author": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "body": "Looks like @Gary Mathews has put together a newer PR for 6.0.4 that includes #8897 as well as a couple other related PR's:\r\n\r\nPR# 8910 (https://github.com/appcelerator/titanium_mobile/pull/8910) which includes cherry-pick of #8894 #8897 #8908 addressing TIMOB-24497, TIMOB-24316, TIMOB-24527\r\n\r\nHow can we get an sdk build w/ these changes incorporated (prior to 6.0.4 release) to verify these fixes addressed our problem?", "updateAuthor": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-04T14:04:49.000+0000", "updated": "2017-04-04T14:17:52.000+0000" }, { "id": "416774", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Everyone, please check this build below which is built for PR https://github.com/appcelerator/titanium_mobile/pull/8910 & let us know if this resolves your issue.\r\n\r\nLink: https://www.dropbox.com/s/lbc9tvzl8z7e34w/6.0.4.zip?dl=1\r\n\r\n*NOTE* : Do not use this for any of your production apps as this build is not GA & might have bugs/issues.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-04T18:22:05.000+0000", "updated": "2017-04-04T18:26:56.000+0000" }, { "id": "416808", "author": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "body": "The #8910 PR build (https://www.dropbox.com/s/lbc9tvzl8z7e34w/6.0.4.zip?dl=1) is an improvement but the issue is not fully resolved.\r\n\r\nh5. Before #8910 PR, I was getting this:\r\n1) From initial state with app not running - In the phone browser click on a link in a test html page \r\n eg: Launch App\r\n2) Our app opens successfully and handles the link accordingly\r\n3) Now leaving app open, return to the test html page, and click on the same link again\r\n4) Our app ux hangs and shows only the splash screen \r\n\r\nh5. Now with #8910 applied, I am getting this:\r\n1) From initial state with app not running - In the phone browser click on a link in a test html page \r\n eg: Launch App\r\n2) Our app opens successfully and handles the link accordingly\r\n3) Now leaving app open, return to the test html page, and click on the same link again\r\n4) Our app now opens successfully and handles the link accordingly \r\n5) Repeat steps 3 and 4 any number of times and note it continues to work as expected\r\n6) Now still leaving app open - return to the test html page and click on a *different* link this time:\r\n eg: Launch App\r\n7) Our app ux now hangs and shows only the splash screen \r\n\r\nh5. ALSO: I noticed that it will fail in the same way if the app is open before the initial link click:\r\n1) From initial state with app not running - start the app from the app launcher\r\n2) With the app launched and running normally, leave it open and then in the phone browser click on a link in a test html page \r\n eg: Launch App\r\n3) Our app ux now hangs and shows only the splash screen \r\n", "updateAuthor": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-05T01:02:32.000+0000", "updated": "2017-04-05T01:53:15.000+0000" }, { "id": "416824", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for the feedback David, we are looking into it. But please use the {{Preview}} button on the left to check your comment before submitting. All watchers (62+) just received 11 mails regarding your edited comment. We are trying to keep the flow as clean as possible, thx.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-04-05T07:31:12.000+0000", "updated": "2017-04-05T07:31:12.000+0000" }, { "id": "416830", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "I'm having issues with the test build of 6.0.4.GA too. I've created a post at https://github.com/appcelerator/titanium_mobile/pull/8910 (i dont know if this is the preferred location to post that)", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2017-04-05T09:57:00.000+0000", "updated": "2017-04-05T09:57:00.000+0000" }, { "id": "416843", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "Can we get this ticket re-opened so the axway support team doesn't update our enterprise support tickets as resolved?", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-05T15:13:31.000+0000", "updated": "2017-04-05T15:13:49.000+0000" }, { "id": "416957", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jonesdhtx] I can't reproduce your problem, try this build: [6.0.4_20170406_ddc37c0.zip|https://www.dropbox.com/s/404tr0d1kv54o9w/6.0.4_20170406_ddc37c0.zip?dl=1]", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-06T18:26:13.000+0000", "updated": "2017-04-06T18:26:26.000+0000" }, { "id": "417009", "author": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "body": "@Gary Mathews - The 6.0.4_20170406_ddc37c0.zip build did not help the failing scenarios I encountered, and it also re-introduced the earlier problem I was having as well. \r\n\r\nSince you are not able to reproduce the issue on your side - I will try to find some time to put together a full minimal project demonstrating the issues that I can zip up and attach to this ticket.", "updateAuthor": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-07T05:47:38.000+0000", "updated": "2017-04-07T05:47:38.000+0000" }, { "id": "417491", "author": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "body": "@Gary Mathews - Here's a link to a sample project zip that demonstrates the problem: https://www.dropbox.com/s/5o4v1bayqlsr83t/SampleProject.zip?dl=0\r\n\r\nHowever, after playing around with it some more, I'm thinking the reason you weren't seeing the problem before might have to do with the use of back button vs home button (or task switcher).\r\n\r\nHere's a copy of the sample project readme w/ more details:\r\n\r\nh3. SampleApp README\r\n\r\nThis sample app demonstrates that under the scenario outlined below, the app is not getting launched as a new task on Android.\r\n\r\nOnce the sample app is built and deployed to device, you can access the following web page to launch it:\r\n[https://obscure-beach-58781.herokuapp.com]\r\n\r\nThe above page simply contains the following 2 links for launching the app:\r\n\r\n{code:language=|borderStyle=solid|theme=RDark|linenumbers=true|collapse=false}\r\n Manage Order 11112222\r\n Manage Order 33334444\r\n{code}\r\n\r\nOne more note: As mentioned by another poster, there is another issue that is occuring when the app is closed and opened for first time. When doing so we see a "double" launch effect where splash screen and initial screen seems to get displayed twice quickly upon launch.\r\n\r\nh3. Failure Mode\r\n\r\nIf you use the "Task Switcher" to switch between apps you see that the app is not started as a new task.\r\nAlternatively, if you press the home button to leave the app and reopen the browser from launch screen it will fail in the same way.\r\n\r\n* App closed\r\n* In browser, launch sample app w/ link to order 11112222:\r\n 1: *_ App started as New Task _*\r\n 2: Handling: sampleapp://order/11112222\r\n* Use the "Task Switcher" to go back to browser\r\n* Launch w/ link to order 11112222 again:\r\n 1: *_ App started as Resumed/Recycled Task _*\r\n 2: Handling: sampleapp://order/11112222\r\n* Use the "Task Switcher" to go back to browser\r\n* Launch w/ link to order 33334444:\r\n 1: *_ App started as Resumed/Recycled Task _*\r\n 2: Handling: sampleapp://order/33334444\r\n\r\nh3. Success Mode\r\n\r\nHowever if you use the back button to switch between apps it is behaving as expected:\r\n\r\n* App closed\r\n* In browser, launch sample app w/ link to order 11112222:\r\n 1: *_ App started as New Task _*\r\n 2: Handling: sampleapp://order/11112222\r\n* Use the "Back Button" to go back to to browser\r\n* Launch w/ link to order 11112222 again:\r\n 1: *_ App started as New Task _*\r\n 2: Handling: sampleapp://order/11112222\r\n* Use the "Back Button" to go back to to browser\r\n* Launch w/ link to order 33334444:\r\n 1: *_ App started as New Task _*\r\n 2: Handling: sampleapp://order/33334444\r\n\r\nh3. Notes:\r\n\r\nThe key may be in the differences in back vs home button handling on android. There are multiple sources of info on this, here's a quick description grabbed from [http://stackoverflow.com/questions/34081835/difference-between-back-press-and-home-button-in-android]\r\n\r\n{quote}After you start an activity, if HOME key is pressed, then the current activity is stopped and its task goes into the background. The system retains the state of the activity - i.e. onSaveInstanceState will be called. If the user later resumes the task by selecting the launcher icon that began the task again, the task comes to the foreground and resumes the activity at the top of the stack.\r\n\r\nHowever, if BACK key is pressed, the current activity is popped from the stack and destroyed. The assmuption is the activity is done and will not be used again. So the system does not retain the activity's state - i.e. onSaveInstanceState will not be called.\r\n\r\n{quote}", "updateAuthor": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-17T17:28:30.000+0000", "updated": "2017-04-17T17:28:30.000+0000" }, { "id": "417654", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~djonesax] That is expected and usually preferred behaviour, [FLAG_ACTIVITY_NEW_TASK|https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK] states \"_When using this flag, if a task is already running for the activity you are now starting, then a new activity will not be started; instead, the current task will simply be brought to the front of the screen with the state it was last in._\".", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-19T13:50:23.000+0000", "updated": "2017-04-19T13:50:23.000+0000" }, { "id": "417688", "author": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "body": "However - the current task is not simply being brought to front of the screen. We are seeing that the our app is being \"pseudo-restarted\" when we get the second invocation. In other words: we see that our Alloy.Globals object is still intact via an explicit property we set when first launched , but yet a new instance of our application controller/view is being created and shown.\r\n\r\n", "updateAuthor": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-19T17:03:43.000+0000", "updated": "2017-04-19T17:03:43.000+0000" }, { "id": "417974", "author": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "body": "Were you able to recreate the issue? Are you planning to address the issue on this ticket or should we create a new one?", "updateAuthor": { "name": "jonesdhtx", "key": "jonesdhtx", "displayName": "David Jones", "active": true, "timeZone": "America/Chicago" }, "created": "2017-04-24T21:52:52.000+0000", "updated": "2017-04-24T21:52:52.000+0000" }, { "id": "423598", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is definitively not resolved for me.\r\nI'm on 6.1.1.GA and I added {{true}} inside my tiapp.xml:\r\n- launch the app\r\n- push it to the background using the home button\r\n- click on a link that can be handled by the app\r\n- the app tries to reopen itself but it crashes with the stacktrace reported below\r\n\r\n\r\n{code:java}\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: FATAL EXCEPTION: main\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: Process: com.myapp, PID: 7451\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object org.appcelerator.kroll.KrollDict.get(java.lang.Object)' on a null object reference\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.app.ActivityThread.-wrap11(ActivityThread.java)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.os.Looper.loop(Looper.java:148)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.app.ActivityThread.main(ActivityThread.java:5417)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat java.lang.reflect.Method.invoke(Native Method)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object org.appcelerator.kroll.KrollDict.get(java.lang.Object)' on a null object reference\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.kroll.KrollProxy.onPropertyChanged(KrollProxy.java:965)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:196)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.kroll.KrollRuntime.runModule(KrollRuntime.java:241)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:128)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:183)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:172)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:676)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:169)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:161)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.app.Activity.performCreate(Activity.java:6237)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)\r\n07-06 19:46:35.953 7451 7451 E AndroidRuntime: \t... 9 more\r\n{code}\r\n", "updateAuthor": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-07-06T17:50:41.000+0000", "updated": "2017-07-06T17:51:27.000+0000" }, { "id": "440199", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:30.000+0000", "updated": "2018-08-06T17:49:30.000+0000" }, { "id": "444758", "author": { "name": "jdempsey", "key": "jdempsey", "displayName": "Jake Dempsey", "active": true, "timeZone": "America/Chicago" }, "body": "I am experiencing this same issue with 7.4.1GA. If my app is not started and I launch it with a url scheme it launches. If the app is already running and I launch it with a url scheme it freezes at the splash screen. This issue seems to still be broken.", "updateAuthor": { "name": "jdempsey", "key": "jdempsey", "displayName": "Jake Dempsey", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-19T22:26:25.000+0000", "updated": "2018-12-19T22:26:25.000+0000" }, { "id": "445205", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This \"singleTask\" behavior is not a bug and is by Google's design.\r\n\r\nWhen using launch mode \"singleTask\", the Android OS will automatically close all child activity windows when resuming your app. The splash screen is the root activity. So, the app is not hung. The child windows have been forcefully closed by the Android OS and Titanium does correctly fire their associated \"close\" events.\r\n\r\nAs of Titanium 8.0.0, we're providing another option which doesn't involve \"singleTask\" (which I recommend that you don't use). In 8.0.0, we've completely refactored our intent handling so that an existing app instance will be resumed and the \"newintent\" event will be correctly fired when a new intent has been received. This way an Android app behaves a bit more like iOS, which is what everyone is after.\r\n\r\nPlease see [TIMOB-26075] for more details.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-11T03:36:48.000+0000", "updated": "2019-01-11T03:36:48.000+0000" } ], "maxResults": 100, "total": 100, "startAt": 0 } } }