0
votes

I have a very simple question. When a device like (galaxy tab) is connected to a computer in mass storage mode; both internal and external sd-card become unavailable. I just want to know if there is any way of determining if internal storage is not available because the device is in usb mass storage mode..

Thanks to all

1
are you wanting to check at a specific point in your application, or be notified when the status of the storage changes? its not clear. - pogo2065

1 Answers

0
votes

For API version 8, I think the following will work.

Use a broadcast receiver that listens to ACTION_UMS_CONNECTED

For versions beyond 8, use android.os.storage.EventListener. Check this out.