{ "id": "171712", "key": "TIMOB-26075", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-01-04T21:17:23.000+0000", "created": "2018-05-30T03:33:56.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "breaking-change", "intent", "intent-filter", "resume" ], "versions": [], "issuelinks": [ { "id": "57114", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "92064", "key": "TIMOB-9285", "fields": { "summary": "Android: Message \"An application restart is required\" fires incorrectly.", "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": "57491", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "155156", "key": "TIMOB-20500", "fields": { "summary": "Android: App relaunches when resumed from background", "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": "57116", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "166203", "key": "TIMOB-24427", "fields": { "summary": "Alloy app started from secondary activity fails horribly", "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": "57117", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "167984", "key": "TIMOB-24747", "fields": { "summary": "Android: new tasks are created upon opening a custom URL scheme", "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": "57047", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172695", "key": "TIMOB-26625", "fields": { "summary": "Android: Can't open Titanium app through intent (7.5.0 regression)", "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": "57113", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "78931", "key": "TIMOB-4941", "fields": { "summary": "Android: More graceful workaround for Android Bug 2373 & 5277", "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" }, "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": "57112", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "62191", "key": "TIMOB-1559", "fields": { "summary": "Android: Workaround Android Bug 2373 & 5277", "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 } } } }, { "id": "57056", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172717", "key": "TIMOB-26637", "fields": { "summary": "Android: Add \"rootActivity\" property to Ti.Android module", "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 } } } }, { "id": "57057", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172718", "key": "TIMOB-26638", "fields": { "summary": "Android: Root Ti.Android.Activity \"intent\" property should be updated when \"newintent\" event is 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": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "57055", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172716", "key": "TIMOB-26636", "fields": { "summary": "Android: Remove deprecated \"newIntent\" event in favor of \"newintent\"", "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": "None", "id": "6" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-12-04T20:10:25.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nTitanium's app resume handling from notification, shortcuts, intent-filters, etc. is problematic. It does not always resume and instead displays a new splash-screen instance which never runs the \"app.js\" (appears to hang) or a dialog stating that the app needs to be restarted (which can get stuck in an infinite loop).\r\n\r\nThe following is a list of issues that have been reported. Some are flagged closed, but they're not completely resolved:\r\n* [TIMOB-1559]\r\n* [TIMOB-4941]\r\n* [TIMOB-9285]\r\n* [TIMOB-15253]\r\n* [TIMOB-24427]\r\n* [TIMOB-24747]\r\n* [TIMOB-25776]\r\n\r\n*Recommended Solution:*\r\nGet rid of *+all+* of the activity \"restarting\" code. No one likes this behavior.\r\n* [TiRootActivity.onCreate()|https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiRootActivity.java#L75]\r\n* [TiLaunchActivity.onCreate()|https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiLaunchActivity.java#L142]\r\n* [TiBaseActivity.onCreate()|https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiBaseActivity.java#L578]\r\n\r\nDrop support for Android bug 2373/5277 related \"tiapp.xml\" properties:\r\n* [link|https://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-src-29004921_tiapp.xmlandtimodule.xmlReference-PropertiestoworkaroundAndroidbugs2373and5277]\r\n\r\nIn the main activity's {{onCreate()}}, we should do the following:\r\n# Check if {{TiApplication.getRootActivity()}} is not null. This tells us if a pre-existing activity window is already in the background and needs to be resumed. If it doesn't exist, then go ahead and create the activity (we're done).\r\n# Fetch the pre-existing root activity's intent. If we call {{Context.startActivity()}} with this intent, then it'll resume it with all of its child activity windows intact. _(This is what we're missing.)_\r\n# Call {{finish()}} for the new activity since we don't want to spawn a new instance. Attempt to disable the activity window's animation if possible via {{Activity.overridePendingTransition()}}.\r\n# Have the pre-existing root activity fire a \"newintent\" event with the intent received by the new activity that we just finished/closed. (We must wait for the old activity task to resume first though.)\r\n\r\n*Issues to Investigate:*\r\n* The {{Activity.getIntent()}} can return {{null}} in rare cases ([link|https://stackoverflow.com/questions/37856407/can-activity-getintent-ever-return-null]). We need to figure out how to resume the app's activity in this case.\r\n* We need to double check the necessity of {{TiBaseActivity.isUnsupportedReLaunch()}}. I suspect it's handling the case where a new Java runtime and {{Application}} instance is being re-created for a pre-existing app process (the C/C++ side's static variables still remember previous application info).\r\n* Check how this works with launchMode \"singleTop\". (It is being used by some community users. Although with this change, we shouldn't need it anymore.)\r\n* Re-test with Titanium's \"Live-View\" feature and {{Ti.App._restart()}} method to make sure they don't break.\r\n\r\n*Limitations:*\r\n* Titanium only supports running one V8 JavaScript runtime at a time. So, multiple activity tasks cannot be supported due to this limitation. This is partly why we need to refactor the app resume behavior. _(This may be fine from a portability standpoint anyways since iOS does not support this.)_\r\n* We should avoid launchMode \"singleTask\" support. While it does what we want and makes an Android app work more like iOS, it comes with a huge limitation. A \"singleTask\" activity's child activity windows are all torn down by the Android OS after homing-out of the app and then resuming it. \"singleTask\" is only a viable solution if we re-architected Titanium to only support one activity and and all {{Ti.UI.Window}} objects spawned fragments instead, but this would be a major MAJOR breaking-change that is best avoided for now.\r\n\r\n", "attachment": [ { "id": "65965", "filename": "IntentRequestResultTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-12T02:00:59.000+0000", "size": 1640, "mimeType": "application/x-javascript" }, { "id": "65964", "filename": "IntentReturnResultTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-12T02:00:59.000+0000", "size": 1924, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Android: Refactor app resume and \"newintent\" handling", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "444512", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10519", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-12T02:55:34.000+0000", "updated": "2018-12-12T02:55:34.000+0000" }, { "id": "444998", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR Merged.\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-04T21:17:19.000+0000", "updated": "2019-01-04T21:17:19.000+0000" }, { "id": "445064", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "*Closing ticket.*\r\n\r\nThe improvement is present in SDK:\r\n\r\n{noformat}\r\n8.0.0.v20190104153150\r\n{noformat}", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2019-01-08T10:34:57.000+0000", "updated": "2019-01-08T10:34:57.000+0000" }, { "id": "453028", "author": { "name": "jdempsey", "key": "jdempsey", "displayName": "Jake Dempsey", "active": true, "timeZone": "America/Chicago" }, "body": "This looks to be broken again:\r\n\r\nWe have an issue where when we share a file from android downloads to our app it is launching a second instance of the app. This was fixed in a previous release and is broken again. We have a CSV file, when we share it to our app it used to open the existing instance of the app and we would get access to the CSV file that was sent to it via the intent and the getBlobExtra. We can no longer do this as its broken again.\r\n\r\nI have tried building w/ 8.1, 8.2, and 8.3 and all are launching a second app instance.\r\n\r\nIf I get the currentActivity and the intent from that I can make my app work again but my understanding was that a second app instance was not intended and it should be launching the existing instance and we use the root activity to get the intent as outlined here: https://wiki.appcelerator.org/display/guides2/Android+Intent+Filters\r\n\r\nIn addition when the app is not running and I send a file to it it will launch a new instance but intent.hasExtra(Ti.Android.EXTRA_STREAM) return false where intent is Ti.App.Android.launchIntent.", "updateAuthor": { "name": "jdempsey", "key": "jdempsey", "displayName": "Jake Dempsey", "active": true, "timeZone": "America/Chicago" }, "created": "2019-12-04T20:10:25.000+0000", "updated": "2019-12-04T20:10:25.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }