GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-12-06T00:24:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.5.1 |
Components | Android |
Labels | Android, Intent, SafeArea |
Reporter | Jorge Macias Garcia |
Assignee | Yordan Banev |
Created | 2018-12-04T08:33:05.000+0000 |
Updated | 2019-01-08T03:17:48.000+0000 |
After 7.5.0.GA release it is not possible to launch a Titanium app through an intent. It hangs on the startup.
It 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.
I've attached a sample app and the logcat error trace.
Steps to reproduce:
1. Compile both apps and deploy it.
2. Launch SourceApp
3. Click "Open Target"
4. TargetApp hangs at startup due to Ti exception
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.
PR: https://github.com/appcelerator/titanium_mobile/pull/10507
8.0.0? Really?
7_5_X: https://github.com/appcelerator/titanium_mobile/pull/10508
Encountered some issues on android 4.1.Commented in the PR.
FR Passed. PR's merged.
Verified the fix in SDK 7.5.1.v20181210141225 & 8.0.0.v20181210140414. Closing.
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). I want to be able to open my app by registering a url to it. My main activity looks like this: {noformat}
api-dev.ocomondo.com
. This is also where I've setup theassetlinks.json
file. It's broken in *7.5.0.GA* and also in *7.5.1.v20181218070137*.[~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. What exactly is not working for you? When you launch your app via a URL intent, does your app look like it gets stuck at the splash screen? If 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. The 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. So, with the current and older versions of Titanium, what you're supposed to do is one of the following:
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).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).
Or 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. Please see [TIMOB-26075] for more details.