开发者

How to cleanly exit an external app when the sd-card gets unmounted?

my app includes a service, and I'm looking for a way to gracefully exit when the app is installed on th开发者_StackOverflowe sd-card, and that the sd-card gets unmounted. I don't need the service to restart after the sd-card gets mounted again. I just need to release some files/resources, etc..

I thought about listening for Intent.ACTION_MEDIA_EJECT, but this is apparently broadcast after the external apps have been forced to exit.

Any solution?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜