- Home /
How am I able to get the root path of an SDcard for any one android device?
I am writing a program to search through a devices files and compile all mp3 files for the user to select from. I ran into a problem for where to start the search. Some phones have their default SD path at sdcard, while others have a path similar to sdcard/external_sd and some are even different than these standards.
I tried using Application.persistantDataPath but it just gives a string of connecting paths, so I extracted the first two subpaths from the string(usually the "/mnt" and one step into the sdcard path) but for some devices, specifically the ones with the "sdcard/external_sd" path, the search takes much longer than just linking to the path to begin with.
Is there a more efficient way to get the default root path of a devices external storage? Or is there an easy way to the the Android API functions inside of Unity?
Your answer
Follow this Question
Related Questions
Android - Access Video from StreamingAssets 0 Answers
Android internal storage folder 0 Answers
Save Gif to Photo Gallery from Persistent Path - iOS Android 1 Answer
Loading from mobile internal storage and/or sd card 0 Answers
How to drag an object along a path using touch controls in specific areas? 1 Answer