开发者

Android, load mp3 on first activity and access it on activity further down

开发者 https://www.devze.com 2023-03-28 06:45 出处:网络
Is there a way to load a MP3 file into the soundpool in activity 1, then access it further down in activity 5?

Is there a way to load a MP3 file into the soundpool in activity 1, then access it further down in activity 5?

I have been trying this with no success.

This is of course to cut开发者_如何学Python down on load times and use the same files all over the place without loading them over and over and over again

Thanks! Ryan


You can use services for that matter. Services can run in the background regardless of activities states. Take a look here

You can initialize the soundpool in the service and access it via your activities.

0

精彩评论

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

关注公众号