开发者

What happens to android app when a phone call interrupts the app?

开发者 https://www.devze.com 2023-03-14 16:11 出处:网络
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 cal

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

0

精彩评论

暂无评论...
验证码 换一张
取 消