开发者

android: detecting usb mass storage mode

开发者 https://www.devze.com 2023-03-30 21:19 出处:网络
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 a

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

精彩评论

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