Android : How to invoke media player
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
精彩评论