Yes when the sd card is unmounted any processes that have open files on it need to be killed so the filesystem can be cleanly shut down.
You can listen for the external storage status broadcasts as per android.os.Environment to find out when it is being unmounted. On Mon, Dec 20, 2010 at 11:53 AM, John <[email protected]> wrote: > My app has an open file handle on the sdcard. If it's plugged into the > PC via USB, I can mount the sdcard on the PC and my app closes. > > The logcat info has this line: KillProcessesWithOpenFiles /sdcard > > Is this expected behavior? Is there some event I can capture to > gracefully close? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

