Search code examples
sleepmountbootandroid-sdcard

Android detect when the sdcard mounts


I'm writing an app that runs at boot up but it requires the sdcard so i need a way to detect when the sdcard has mounted so that my app can start doing what it needs to do once the sdcard is mounted. If this is not possible how can i have the app sleep for say 20 seconds what would i have to do to make that happen could you paste the code please. Thanks for any help


Solution

  • How about registering a broadcast receiver for ACTION_MEDIA_MOUNTED?