right now, I'm avoiding loading system audio for the devices and emulator I have by hardcoding them in SQLite NOT LIKE ...
statements while querying the ContentResolver
, but, what I have found that the location for the storage of sytem audio(like alarm tones and all the audio factory loaded) doesn't have a standard location in all android device.
So, to avoid loading all system audio, I need a way to fetch the directory where these audio are located, so far, I have gathered a data of these locations where the sytem audio might be:
"/system%",
"/storage/emulated/legacy/Ringtones/%",
"/storage/emulated/0/Ringtones%",
"/product/media/audio%"
but, since these might not be adequate, is there a way to fetch the directory path where the system audio is located in android?
Query audio files with MediaStore , then filter audio files with AudioColumns , and more specific for alarm sounds use IS_ALARM.
As you say :
I have found that the location for the storage of sytem audio doesn't have a standard location in all android device.
MediaStore is a database which holds references of the files and it is a solution to query files in different system storage locations.