0

我需要访问通过 OTG 连接到 android 设备的笔式驱动器。使用explorer,我可以在/storage/usbdisk 中找到挂载点。但是,我怎样才能通过代码找到挂载点 dynamicallu?

谢谢!罗伯托

4

1 回答 1

4

恐怕在各种设备上访问 OTG 的唯一方法是查询所有这些目录:

/storage/UsbDriveA     (all Samsung devices)
/storage/USBstorage1   (LG G4, V10, G3, G2, other LG devices)
/storage/usbdisk       (Moto Maxx, Turbo 2, Moto X Pure, other Motorola devices)
/storage/usbotg        (Sony Xperia devices, Lenovo Tabs)
/storage/UDiskA        (Oppo devices)
/storage/usb-storage   (Acer Iconia Tabs)
/storage/usbcard       (Dell Venue -- Vanilla Android 4.3 tablet)
/storage/usb           (HTC One M7, and some Vanilla Android devices)

在我的设备集合和其他 3 人的设备上进行了测试,并快速前往 Bestbuy 测试最新的旗舰产品。我知道我缺少的唯一流行设备是位于中国的 Hawuei/Xioami 设备,它们在英国国家越来越流行。

希望这可以帮助

于 2016-03-23T04:08:21.320 回答