I am trying to get filenames(and also the filepath), from a Garmin device which acts as a usb mass storage. Connecting the device to the computer, the filepath is G:\Garmin. Connecting that to the android tablet using OTG and Explorer(i have check the app setting - the package name is : com.android.rk), the filepath is USB/Garmin. Using ES File Explorer, I have seen that the file path is mnt/usb_storage/Garmin. So in the code, as I am trying to parse the system.xml from the file path usb_storage/Garmin, I have put the filepath like this:
String file = Environment.getExternalStorageDirectory() + "mnt/usb_storage/Garmin/system.xml";
When I run the app, it crashes, meaning that it cannot find the file system.xml. Is it right that I use Environment.getExternalStorageDirectory() when I'm looking for the file in a usb device connected via OTG? Can you please point me to what should be done? Thank you so much.