[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 received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


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 AM, John jo-d...@hotmail.com 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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en