简体   繁体   中英

Android setting ringtone hardcoding external directory

My app sets the ringtone using the MediaStore class. Everything works fine however I have a question regarding the default path for ringtones. The path I am writing the.mp3 to is external storage /sdcard/media/audio/ringtones... will I have to programatically check if each directory exists before committing to a save path or is this path universal and on all androids? I have tested my app on 3 devices and it worked each time, however could there be a situation where a device uses some other directory other than the one hardcoded (mentioned above)?

Thanks in advance.

I believe that the path is universal. However, if a rooted user decides to muck around with it, errors may ensue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM