Is there any way to get the details of current song played by mediaplayer?
+2
A:
There is no documented method for getting info on the currently playing file from a MediaPlayer instance, you'll need to make your app store that information itself in another way. If you're using a Service to keep track of your MediaPlayer instance (which I'd recommend) then this shouldn't be too hard.
fredley
2010-09-01 10:27:35
Hi Fredley, Thank you for your suggestion.
Eby
2010-09-01 10:33:26
I can see lot of widget which shows the song details like you see in http://developer.android.com/guide/topics/appwidgets/index.html this widget.
Eby
2010-09-01 10:34:42
Yes. And? Music widgets are designed to integrate with a certain player, and you can't make your own widget easily integrate with another media player.
fredley
2010-09-01 10:55:42
OK... Then i ll create a service to keep track on Media player instance..Thank you very much for your suggestions
Eby
2010-09-01 11:14:10
A:
I think you need to have your own model classes from wherein you can set and get your song title and other info
If you are keen to know how it is being implemented you can get the source from here and see how they have implemented it
Rahul
2010-09-01 11:13:19