[android-developers] KillProcessesWithOpenFiles

2010-12-20 Thread John
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

Re: [android-developers] KillProcessesWithOpenFiles

2010-12-20 Thread Dianne Hackborn
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