fix(android): fix starting activity when launching from home screen #14141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a tricky one:
When I launch my apps from the home screen I most of the time have this during start:
splash screen/icon and then it moves to the left and my app is starting:
Bildschirmaufnahme_20241102_124139.webm
It doesn't happen when you launch it from the normal app launcher. And it doesn't happen for all apps and even some only do that from the first home screen and not from the 2nd. Super strange!
Looks like the issue is in the
filterEquals(intent)
part here: https://github.com/tidev/titanium-sdk/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiRootActivity.java#L263When I dump the intent content the first one is:
and the second one is:
It is still the same BUT
pkg
is added in one and not the other depending on where you launch it from.The fix is: just adding the package name to both intents so they are always there so the check won't fail when one of the launch intents has that and the other doesn't.