开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜