0

I am using eclipse for Android app development. I have written both OnStop and OnDestroy methods, but when I stop the app from "Devices" tab of Eclipse, I get the message "app has died", and both the methods are not called. Am I missing something?

If the above behaviour is correct how to test OnStop and OnDestroy methods using AVD in eclipse?

Edit-1: Currently I am using "home" button in my computer keyboard to go to the AVD home screen to test this. Is this the best way?

My AVD does not show the home, back buttons due to some reason.

Thanks Jagadesh S

Jagadesh
  • 41
  • 7

1 Answers1

0

Try using OnsavedInstance, it will be always called when you app destroys or stops.

Read following links for detials https://developer.android.com/training/basics/activity-lifecycle/recreating.html

onSaveInstanceState () and onRestoreInstanceState ()

regards aShish

Community
  • 1
  • 1
Ashish Rawat
  • 5,541
  • 1
  • 20
  • 17