When you user click Home
on any of your activity, the system will save the state of the activity stack and the state of your top-activity.
Then, when your user go back to your application, this activity and the activities stack will be restored on a new JVM.
- Open your app
- Go to the activity you want to test
- Click Home and wait 3s
- Run this command
adb shell am kill <app-package-name>
- Launch the app from "Recent activities"