开发者

Android setting ringtone hardcoding external directory

开发者 https://www.devze.com 2023-03-07 22:08 出处:网络
My app sets the ringtone using the MediaStore class. Everything works fine however I have a question regarding the default 开发者_如何学Gopath for ringtones. The path I am writing the .mp3 to is exter

My app sets the ringtone using the MediaStore class. Everything works fine however I have a question regarding the default 开发者_如何学Gopath 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消