I have a welcome screen that can be started as the first activity in my app, or it can be started by the main activity that the user spends their time in. I want it to act s
Everyone seems to be pointing to the same solution but nobody is putting it in clear words. Let me do that.
It seems like getCallingActivity() returns results inconsistently across different android platforms.
The issue is caused probably because you are setting the launchMode of your activity as singleInstance or singleTask. Setting it to singleTop or leaving it as the standard one should solve your issue. Of course, changing the mode should not affect your use case so this is at your discretion.
In case it does affect your use case, you can pass the package name in the extras of the intent to simplify things.
Note that setting singleInstance or singleTask returns non null results on Lollipop release.