sd card storage state and detecting it being plugged in or not...

by sdphil » Sat, 16 Jan 2010 09:41:17 GMT

Sponsored Links
 i have an app that needs to be able to write to the sdcard.

so, it goes without saying that I need to be able to detect if the
sdcard is being shared or not -- simple enough.

if this is true, then my app does not have access to the SD card -

I would also like to know while my app is running, if the state of the
SD card changes.  It looks like I can create a BroadcastReceiver with
an IntentFilter that traps the event.

the problem is that that the system winds up killing my process
because it has a file open on the SD card.

01-15 17:33:44.091: ERROR/vold(47): KillProcessesWithOpenFiles /sdcard
01-15 17:33:44.322: ERROR/vold(47): process com.test.test (7351) has
open file /sdcard/test/logfile.txt

how can I prevent this?


Other Threads

1. Handling multiple resource trees

I am splitting my code into a common source tree witb code to share
among multiple android projects and
project specific source trees. This works well except for resources.
My development environment (intellij) has problems with
multiple resouce trees and gives strange errors when multiple res
directories are included -
Has anyone gotten this going and if so how were multiple resource
directories handled????


2. Update status via Facebook for Android

Just sharing aja, klo ada yang mau ngeracunin orang or mengeksiskan android
di facebook.. :D

Facebook for 

Sent from Red Envelope for Green Robot

"Indonesian Android Community [id-android]" 

3. Help ! Urgent

4. Upgrade os samsung Galaxy Spica GT-I5700

5. Making a clickable LinearLayout change color on click?

6. Is getInstallerPackageName the solution to piracy?

7. How to end the Application?