开发者

android: detecting usb mass storage mode

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..

Than开发者_开发技巧ks to all


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜