There is a broadcast sent when the SD card is being unmounted (sorry I don't
remember the name off-hand).  You should close all your files at that point.
 If you don't, the platform needs to kill the process because Linux can't
unmount the file system while any files remain open on it.

On Sat, Jul 10, 2010 at 10:35 AM, ls02 <[email protected]> wrote:

> I found that Android kills my app process that has files open on SD
> card when the card is mounted when the device connects to a computer.
> It is done without any notification, I see in the log something like
> KillProcessWithFilesOpenedOnCard message, my app receives no
> notification, has no chance to gracefully shutdown. Moreover Android
> restarts my app immediately after killing it with latest Activity not
> the default activity launched in default standard mode. It does it
> while the card is still mounted and device is still connected to a
> computer.
>
> Can someone explain this all to me, how it I supposed to work, and if
> there is any way to alter this weird rude behavior? Particularly, if
> there is way to get any notification before the process is killed by
> the OS and to prevent relaunching it while the card is still mounted?
>
> --
> 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

Reply via email to