I have an issue in my app only for the specific device only when I am clicking on the home button after performing the few steps in my app, soo app is in the recent tabs. If I will open the app from the recent tabs then it will open from the last page where I drop the app last, but if I will click on the app icon instead of recent tabs then the app will open from the splash screen.
This will happen only for the one Samsung device and other apps were working fine for the same device.
Please do help me if anyone faced the same issue.
I did face the same issue in the past and that too with a Samsung device.
The solution(may be temporary fix for you as I did not test it on other models of Samsung) which worked in my case is to write below code in the onCreate() of the initial/launch Activity:
if (!isTaskRoot()
&& getIntent().hasCategory(Intent.CATEGORY_LAUNCHER)
&& getIntent().getAction() != null
&& getIntent().getAction().equals(Intent.ACTION_MAIN)) {
finish();
return;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With