Say, I am about to inquire about current broadcasting of the stream "http://streaming.shoutcast.com/80sPlanet" (online radio "A.0.0.00Radio:All 80s All The Time"). I can make a HTTP GET requist to this URL with header "icy-metadata" set to "1", and it returns including the following "icy-*" headers:
key = "icy-br"; value = "128"
key = "icy-genre"; value = "Decades,80s"
key = "icy-metaint"; value = "16000"
key = "icy-name"; value = "A.0.0.00Radio:All 80s All The Time"
key = "icy-notice1"; value = "<BR>This stream requires <a href="http://www.winamp.com">Winamp</a><BR>"
key = "icy-notice2"; value = "SHOUTcast DNAS/posix(linux x64) v2.5.1.725<BR>"
key = "icy-pub"; value = "1"
key = "icy-sr"; value = "44100"
key = "icy-url"; value = "http://a.0.00radio.com/80s/"
But there is no info about what is currently broadcasting on the stream (I mean song/artist/album/etc). Though, on the stream homepage (http://80splanet.com) there is always up-to-date information. I've been told that it is possible to get the "now playing" info by HTTP GET request to the stream URL adding "/7.html" or "/stats". And it works for some streams. For example:
http://198.100.125.242/7.html
<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>383,1,541,30000,377,128,Man of the Hour - w/ Patrick and Sebastian </body></html>
(The numbers are the stream statistics. They are explained in the SHOUTcast server documentation) But most of the streams do not support this feature (not "/7.html" nor "/stats"). HTTP error 404 returns or similar.
It looks like SHOUTcast provides some API (wiki.shoutcast.com/wiki/SHOUTcast_Developer) to request it's Radio Catalog, get Top Stations Charts and so on. There is also "SHOUTcast XML Metadata Specification". And it seems that there is a way to get that Metadata from the stream somehow.
Also, there is a way to dig into the stream raw data and search for the metadata basing on the "icy-metaint" header value as it explained here: stackoverflow.com/a/4914538/8128293, but (first) I have no access to the raw data of the stream (the android.media.MediaPlayer class recieves only the stream URL and maintain connection within itself). (Second) I am not sure about this approach due it is not docummented anywhere. And (third) I'm not sure if it would work with non-mpeg audio streams (for ex: audio/aacp).
Also I heard that there is a way to get this kind of metadata via JSON request to the stream, but still have no example to look at.