detecting virtual sd card

by petunio » Tue, 26 Jan 2010 23:10:02 GMT


Sponsored Links
 I have problems detecting whether a (virtual) sd card is installed in
the emulator
I have created a virtual sd card using mksdcard, and now I start the
emulator with the option
-sdcard path

This seems ok, but when I run the following code

String state = android.os.Environment.getExternalStorageState();

if(!state.equals(android.os.Environment.MEDIA_MOUNTED))

{

throw new IOException("SD Card is not mounted. It is " + state + ".");

}


I get the IOException, telling me that the state is "removed"

does anybody knows what I am missing here?

Thanks

--



Other Threads

1. "Sorry, this video is not available." when tapping on an embedded YouTube video from the Android browser

I see that annoying message all the time on my Droid.

On Dec 26 2009, 4:59am, Marek Urbaniak <marek.urban...@gmail.com>





--

2. Android for stock trading

If you do stock trading, check out this article on apps for stock
trading
http://droidfreeapps.com/2009/12/android-apps-for-stock-trading/

--

3. New Year Wishes to the Android team/community.

4. SOLD WTS: HTC Magic white seken

5. Customize ramdisk generated init.rc

6. MMS API and Enumeration

7. Detect finger going off screen?