What happens to android app when a phone call interrupts the app?
I am working on an app and in one of my activities I display a progressdialog. I have managed it so that it displays correctly during rotations, and I thought that would handle the case of a phone call too, but when I test it with a phone call the dialog goes away. So what exactly doe开发者_如何学Pythons the phone call do to the application and how is a part of the application lifecycle?
onPause and onStop are called, onDestroy may be called but you can't rely on it.
Long-press your home button and switch to another application... its basically the same thing. http://developer.android.com/reference/android/app/Activity.html
精彩评论