Android Question External Storage - Programmatic Access

RichardN

Active Member
Licensed User
I have been asked to look at writing a utility for an Android Media Player running Android 6.0.1.

For this task I need to read (read only) an external storage device which is a HDD that happens to be hot swappable. The fact that it is hot-swappable is not important to the task as the drive will never be removed, however it suggests to me that that the HDD is being handled by the system as a USB device. I am aware of the External Storage library but I wish to read files from the HDD programmatically WITHOUT the user being presented with a dialogue to begin the process. Is it possible with this lib?

Elsewhere on the device I have found mp3 files referred to by their static URI.... Am I able to access files in this manner somehow?

file:///storage/5C3A3E263A3DFD98/Music/MusicTrack.mp3
 

Geezer

Active Member
Licensed User
This will access the external storage with no problems on android 6

 

RichardN

Active Member
Licensed User
Thanks Geezer.... Not quite what I was looking for as it would require a completely different approach. I already have a database of everything on the HDD and figuring what relates to what is not quite the angle I would like to take.
 
Top