0

Is it possible to get track name while playing radio stream via MediaPlayer?

1 Answers1

1

I would say pretty much with certainty - no, it isn't possible.

I can't see any MediaPlayer methods which suggest it's possible plus the way that metadata such as track name etc is presented in streaming media, will depend on the source, e.g, Shoutcast or otherwise.

If it can be done I'd be interested to know but I'd suspect you'd need to write something like a Shoutcast client (or other client depending on source). You'd still use MediaPlayer for streaming but would need extra code for accessing the metadata.

Squonk
  • 48,735
  • 19
  • 103
  • 135
  • Unfortunately I don't even realise what should I google. Can you give me some hints? –  Dec 31 '10 at 09:45
  • @Mighter : I'm not sure at this stage as I haven't done much radio streaming with Android and I don't know what sort of streams you want to access. Let me know and I'll try to help later today (perhaps 12 hours from now). – Squonk Dec 31 '10 at 09:54
  • It seems that I should use this http://www.smackfu.com/stuff/programming/shoutcast.html. Also http://developer.android.com/reference/android/media/MediaPlayer.OnInfoListener.html this interface can be used to indicate metadata update, but I don't see how to use it. –  Dec 31 '10 at 10:23
  • @Mighter : The explanation is in the text of that link you posted but it implies you are handling the stream yourself (i.e., not using something like MediaPlayer). I think if you really need to do this you might want to look at the accepted answer to this question http://stackoverflow.com/questions/1963105/listen-to-a-shoutcast-with-android ...it might help – Squonk Jan 01 '11 at 01:11