I'm following the next flow, Start activity A (loading resources), then go to Activity B (login). I marked Activity A as noHistory = "true" and just after I start the activity B I call finish() on activity A.
The app works as expected and when I pressed the back button from the Activity B the app closes, when I pressed the recents button and select my app, it restarts from activity A, I want it to starts from activity B.
thanks.
Add this to your activity declaration in the AndroidManifest
:
android:excludeFromRecents="true"
And it will be excluded from the "recent apps" list
that is expected behaviour . Since you have pressed the back button the app is closed , if you launch from recent after that its like clicking on app icon to launch the app . You can use shared preferences to save if the first activity is already launched you can directly launch second activity
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