ANDROID: How do I get information about connected USB mass storage devices?

Viewed 35

I am creating an Android application that accesses a connected USB Mass Storage device and saves files to it. Part of the functionality that I want for my app is for the user to be able to see how much space is left on the connected device. I am able to access the device and copy files to and from the device just fine. What I need to know is how would I go about finding the memory information about the connected device?

I have tried using External Storage information but that only grabs the SD card information (unless I am using it incorrectly).

EDIT: I am not getting any information regarding internal or external storage. The way I am getting the USB storage device is by using the ACTION_OPEN_DOCUMENT_TREE Intent then creating a DocumentFile object from the URI that is returned. I do NOT want any information about other storage on the device. I just want the connected USB.

0 Answers
Related