I'm developing an android app that I want to allow users to install on their SD card (http://developer.android.com/guide/appendix/install-location.html). However, the app has some Alarms created through AlarmManager. According to the android developers guide (the link I've included), if the external media (SD card) that the app is installed on is unmounted, the following will happen: "Your alarms registered with AlarmManager will be cancelled. You must manually re-register any alarms when external storage is remounted."
Is there some way I can "wake" my app up so that I can re-schedule the alarms when the SD card is remounted? Maybe use a receiver with some intent filter? I tried adding a receiver for android.intent.action.MEDIA_MOUNTED, but that didn't work (maybe because apps installed externally don't get that intent broadcast, or because the app binaries aren't available immediately after media is mounted and that intent is broadcasted?). Any other intents someone can suggest? Or some other way to do this? The android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE intent (http://developer.android.com/reference/android/content/Intent.html#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE) seems like what I'd need, but the docs say the apps on the external media will not get this intent.