开发者

Android : How to invoke media player

开发者 https://www.devze.com 2023-04-10 21:29 出处:网络
I have many songs in SD card. All I want to do is, just invoke the default media player. How can I do this??开发者_Go百科

I have many songs in SD card. All I want to do is, just invoke the default media player. How can I do this??开发者_Go百科

I found methods to invoke media player and play 1 song but not all the songs in SD card. Also I found a method to play songs in the internal memory not the one in the SD card.

Can someone help me or direct me to some tutorial.

Thanks in advance.


Similar problem is discussed here:

Play playlist with MediaPlayer

Apparently, media player cannot handle playlists. So you should try to listen for completion events using setOnCompletionListener() and play next song when such an event happens.

More info:
Listener (or handler) for video finish

0

精彩评论

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

关注公众号