简体   繁体   中英

List out inserted External Memory Directory Name on Android Tv?

Android-TV has 2 or more USB ports. I need to list out the available usb driver name. User can choose any one of the USB device name, I want to list out the list of file by usb name selection.

Have a look at this link

especially the code

UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
...  
HashMap<String, UsbDevice> deviceList = manager.getDeviceList();
UsbDevice device = deviceList.get("deviceName");

Please note that you will need the necessary permissions in your Manifest.

See Manifest Requirements

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM