问题
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 does the phone call do to the application and how is a part of the application lifecycle?
回答1:
onPause and onStop are called, onDestroy may be called but you can't rely on it.
回答2:
Long-press your home button and switch to another application... its basically the same thing. http://developer.android.com/reference/android/app/Activity.html
来源:https://stackoverflow.com/questions/6448380/what-happens-to-android-app-when-a-phone-call-interrupts-the-app