{ "id": "172695", "key": "TIMOB-26625", "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": "20429", "name": "Release 7.5.1", "archived": false, "released": true, "releaseDate": "2019-02-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-12-06T00:24:22.000+0000", "created": "2018-12-04T08:33:05.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Android", "Intent", "SafeArea" ], "versions": [], "issuelinks": [ { "id": "57047", "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 } } } } ], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2019-01-08T03:17:48.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": "After 7.5.0.GA release it is not possible to launch a Titanium app through an intent. It hangs on the startup.\r\n\r\nIt seems related with new safeArea feature implemented on 7.5.0 SDK. Why is happening this? I don't know but it should not influence in the communication between apps.\r\n\r\nI've attached a sample app and the logcat error trace.\r\n\r\nSteps to reproduce:\r\n\r\n1. Compile both apps and deploy it.\r\n2. Launch SourceApp\r\n3. Click \"Open Target\"\r\n4. TargetApp hangs at startup due to Ti exception", "attachment": [ { "id": "65943", "filename": "app-test-classic.zip", "author": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "created": "2018-12-04T08:29:41.000+0000", "size": 6266740, "mimeType": "application/zip" }, { "id": "65942", "filename": "log.txt", "author": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "created": "2018-12-04T08:29:45.000+0000", "size": 5223, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: Can't open Titanium app through intent (7.5.0 regression)", "creator": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "subtasks": [], "reporter": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "environment": null, "comment": { "comments": [ { "id": "444198", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Same here. We really hope to see a quick 7.5.1 with this one and a backport of https://github.com/appcelerator/titanium_mobile/pull/10479. Otherwise people are quite unable to use this SDK in production.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-12-04T08:48:24.000+0000", "updated": "2018-12-04T08:48:24.000+0000" }, { "id": "444231", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/10507", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-12-04T16:50:10.000+0000", "updated": "2018-12-04T16:50:10.000+0000" }, { "id": "444238", "author": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "body": "8.0.0? Really?", "updateAuthor": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "created": "2018-12-04T19:14:07.000+0000", "updated": "2018-12-04T19:14:07.000+0000" }, { "id": "444244", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "7_5_X: https://github.com/appcelerator/titanium_mobile/pull/10508", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-04T21:22:06.000+0000", "updated": "2018-12-04T21:22:06.000+0000" }, { "id": "444248", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Encountered some issues on android 4.1.Commented in the PR.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-04T23:40:37.000+0000", "updated": "2018-12-04T23:40:37.000+0000" }, { "id": "444296", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-06T00:24:17.000+0000", "updated": "2018-12-06T00:24:17.000+0000" }, { "id": "444446", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.5.1.v20181210141225 & 8.0.0.v20181210140414.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-10T23:21:27.000+0000", "updated": "2018-12-10T23:21:27.000+0000" }, { "id": "445015", "author": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "body": "I'm pretty sure it isn't fixed. Or I encountered another issue. I have a reproducible test project which I can upload (but I can't because the ticket is closed I think).\r\n\r\nI want to be able to open my app by registering a url to it. My main activity looks like this:\r\n\r\n{noformat}\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{noformat}\r\n\r\nThis worked perfectly fine in *7.4.1.GA*. app.js is executed again when the app is opened from the url, in this case {{api-dev.ocomondo.com}}. This is also where I've setup the {{assetlinks.json}} file.\r\n\r\nIt's broken in *7.5.0.GA* and also in *7.5.1.v20181218070137*.", "updateAuthor": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-01-06T15:51:51.000+0000", "updated": "2019-01-06T15:51:51.000+0000" }, { "id": "445053", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~gertjans], this ticket fixes a very specific issue where launching the app with a data intent will cause a \"crash\" in Titanium 7.5.0. It was a regression that was solved in Titanium 7.5.1.\r\n\r\nWhat exactly is not working for you?\r\nWhen you launch your app via a URL intent, does your app look like it gets stuck at the splash screen?\r\n\r\nIf so, then that's not a new issue. That's been an issue for a long while. It happens when you already have an app window instance in the background and you try to launch a new instance via a different intent. Unfortunately, Titanium doesn't support multiple activity instances through different intents. Titanium has never supported this. The issue is that a JavaScript runtime is already running in the background and all JavaScript files that have already been required-in by the 1st instance can't be executed a 2nd time because they're already cached.\r\n\r\nThe behavior that has changed in 7.5.0 is that Titanium will no longer execute the \"app.js\" a second time if it's already currently running in the background. That was a caching issue only with \"app.js\". But even in 7.4.0 when it executed \"app.js\" a 2nd time, any JS files you have required in before wouldn't have been executed a 2nd time anyways. The require() functions would have returned the cached JS modules instead.\r\n\r\nSo, with the current and older versions of Titanium, what you're supposed to do is one of the following:\r\n# Use Android {{launchMode}} \"singleTask\". But note that this will automatically close all child activity windows upon resume (this is Google's behavior, not Titanium's).\r\n# Use \"tiapp.xml\" property \"intent-filter-new-task\" as documented [here|https://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-src-29004921_tiapp.xmlandtimodule.xmlReference-intent-filter-new-task].\r\n\r\nOr wait for Titanium 8.0.0 where we've completely refactored the intent handling code. In that version, Titanium will replicate \"singleTask\" like behavior but without the child activities from being destroyed. If an Android app window is already in the background, then it will be resumed, and a \"newIntent\" event will be fired. It will effectively work just like iOS does which is the behavior everyone is after.\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-08T03:17:48.000+0000", "updated": "2019-01-08T03:17:48.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }