olivierg
olivierg

Reputation: 10240

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 the 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?

Upvotes: 2

Views: 418

Answers (0)

Related Questions