Note that there are some explanatory texts on larger screens.

plurals
  1. PORestart Service for App on SD Card When SD Card Is Remounted
    primarykey
    data
    text
    <p>Due to overwhelming user complaints I have decided try allowing users of my Android application to move it to the SD card as per <a href="http://developer.android.com/guide/appendix/install-location.html" rel="noreferrer">the official documentation</a>. However, a core feature of my application requires a background service to be continuously running. When someone who has moved my app to their SD card mounts their SD card for whatever reason, my background service will be killed.</p> <p>That's all okay by me, as long as I can restart the service at the first available opportunity. Unfortunately, despite the <a href="http://developer.android.com/guide/appendix/install-location.html" rel="noreferrer">install-location</a> guide claiming I can use the Broadcast Intent <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE" rel="noreferrer"><code>ACTION_EXTERNAL_APPLICATIONS_AVAILABLE</code></a> to detect when the SD card is remounted locally, the documentation for that flag itself, <a href="http://groups.google.com/group/android-developers/browse_thread/thread/9ed73e072e0ea22a?hl=en" rel="noreferrer">this newsgroup discussion</a>, and my own testing show that this broadcast is not delivered to the applications which become available. Only applications which have not been moved to the SD card get the Broadcast Intent.</p> <p>Is there any way to restart my background service without waiting for the user to open my app after the SD card is remounted?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload