I find it difficult to display the current track being played from the streaming source. Using the MediaMetaDataRetriever class returns NULL, which means it failed. I wrote a simple method, but now I am inclined to think that this only works in media files such as MP3, WMA, AVI, etc.
public void metaData(){
mmr.setDataSource(urlStation);
String metaD = mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUMARTIST);
Toast.makeText(MainActivity.this, "Artist = " + metaD, Toast.LENGTH_LONG).show();
Any good and easy recommendations would be greatly appreciated. Thank you for your time!
source
share