Saturday, July 24, 2010

[android-developers] Is it possible for my Activity to be notified when the external storage state changes?

I would like my Activity to be informed when the SD card is removed,
since it relies on files from the SD card (to keep apk size down) but
for compatibility reasons is not targeted at Froyo.

I'd like to close the application when the SD card is removed/mounted
(giving the user a dialog message to inform them of course) so that I
don't get IOExceptions etc (I'd quite like to not have to check
everytime I load a file to see if the external storage is available, I
already do a check on application launch).

There doesn't seem to be any attribute in the manifest for this (like
configChanges) that I can find.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate