I would like to manually test that the Android app I am writing works correctly when paused. What can I do through the Android GUI to cause the onPause()
method to be called without causing onStop()
to also be called?
I've tried pulling down the notification bar and receiving a phone call, but neither causes onPause()
to be called.
I would like to find a non-programatic solution that works for multiple versions of Android through the GUI, with or without phones, because I am teaching a class full of students using different devices.
Note that I am not asking how to tell if my onPause()
method is called. I am asking what I can to do cause it to be called, without modifying my application.
I found a solution. I got the idea from a picture in the book Head-First Android Development.
onPause()
method gets called. If I click on the Dismiss icon, my app resumes without itsonStop()
method having been called.