How to mount SD as USB mass storage automatically

by telematics » Fri, 06 Mar 2009 05:13:54 GMT


Sponsored Links
 I am developing an android app that will automatically mount the SD as
the USB mass storage when the G1 phone is connected to a PC via USB,
and automatically umount it when the USB is disconnected. I know to
how to create a broadcast receiver to receive  UMS_CONNECTED and
UMS_DISCONNECTED broadcast intents, but I don't know whic API I should
use to mount/umount the SD. Is there anyone can help me on this?

Thank you in advance.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. how can I dynamic add stuff to a Gallery

Hi,

Can you please tell me how can I dynamic add stuff to a Gallery?

I try
aGallary.addView(myView);

I get this exception:

02-19 22:32:52.271: WARN/System.err(165):
java.lang.UnsupportedOperationException: addView(View) is not
supported in AdapterView
02-19 22:32:52.281: WARN/System.err(165):     at
android.widget.AdapterView.addView(AdapterView.java:434)
02-19 22:32:52.281: WARN/System.err(165):     at
com.mycompany.widget.MyGallery.addView(MyGallery.java:31)
02-19 22:32:52.291: WARN/System.err(165):     at

--~--~---------~--~----~------------~-------~--~----~

2. Emulator Segmentation fault on startup if you have USB Headset Plugged in

Yes, it's a known issue on OS X and I've been unable to reproduce it with
various USB headsets and OS X versions. If this happens to you, can I ask
you to perform some little debugging to help understand the problem better ?
If so, could you just report if using the following options makes the
emulator launch appropriately:

emulator -no-audio  (it should work)
emulator -audio-in none
emulator -audio-out none

thanks in advance





--~--~---------~--~----~------------~-------~--~----~

3. how can make my added directory be compiled when make OpenCore for PC(this is to say compile it outside of Android)

4. Emulator Segmentation fault on startup if you have USB Headset Plugged in

5. Is GSM Modem multiplexer necessary to use GPRS in Android ?

6. Having multiple versions of the same app in the market

7. SQLite rawQuery() '?' params