开发者

Uri to Resource ID

开发者 https://www.devze.com 2023-03-31 15:04 出处:网络
I need to convert my Uri into a Res ID. Is this possible? I need it because I have .mp3s on my SD card that I want to put into SoundPool which only takes Res ID\'s. Note: (Cant use MediaPlayer, n开发者

I need to convert my Uri into a Res ID. Is this possible? I need it because I have .mp3s on my SD card that I want to put into SoundPool which only takes Res ID's. Note: (Cant use MediaPlayer, n开发者_如何学编程eed soundpool functions)

Thanks for the help


Urrrm, can't you use SoundPool.load(String path, int priority) and create your path strings from the Uris?

0

精彩评论

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

关注公众号