• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to trigger onPause()/onResume() cycle on the emulator

BananoTron

Member
hey folks,

can anyone give me a hint how to trigger the onPause() -> onResume() (NOT including onStop()/on(Re)Start()) cycle using the emulator? i tried the "incoming call" function but it always calls onStop() as well. i need this to test if my onPause/onResume code is working properly. while googling i read something about an emulator setting which causes the activities to be destroyed always but i couldn't find that setting in my emulator. if i could deactivate that feature i might be able to test my lifecycle handling better.

any comments are appreciated.
 
I think you can trigger it by pressing home, and then holding home and going back into the app.
 
Back
Top Bottom