- Home /
Search for files on android
I'm trying to get a list of the paths of all mp3 files on the device to access them ingame by using the WWW class. I would like to search the device once, populate the list and save it for later use.
How can I scan through all directories (even on external sd card) and retrieve the corresponding file paths?
I only got access to the standard unity version and not pro if that makes a difference.
Thanks in advance del
Answer by Tseng · Apr 14, 2012 at 12:57 PM
You can only search the directory of your app and the SD-Card.
It's not possible to look into the data directories of the OS or other Apps installed on the device, due to security reasons. Each app runs in it's own sandbox with a certain userId. This userId is unique per App (or per signature, depending on what the developer decided).
You can use C#/.NET IO Methods to query directories and sub directories.
Take a look at MSDN http://support.microsoft.com/kb/303974
The SD card should be by default be mounted as /sdcard
I just downloaded Winamp for Android and the app found the music I add on my phone (Galaxy_S2), so it is possible to find and list all the (music) file of a device. Unfortunatly, I haven't found how yet
Answer by emmanuellesmith · May 06, 2016 at 09:08 AM
Most of the time, I use AirMore to search, transfer and manage files in my Android. It is wireless and free of usage. You may try it just in case. https://play.google.com/store/apps/details?id=com.airmore&hl=en
Your answer
Follow this Question
Related Questions
[ANDROID] Searching a file and get the path to my GUI.TextField? 1 Answer
Save a reachable file on the android device 1 Answer
Files on mobile devices 0 Answers
How to tell android to open a file 0 Answers
Android file path? 0 Answers