Closed Ishu25 closed 7 years ago
Stream url should support metadata. I mean If you don't get notified with any metadata, then your stream url does not broadcast metadata.
But logcat show this info which is right
IcyInputStream: Metadata string: StreamTitle='songname-artist';
but I am unable to display that info onto mainactivity. For that I have to do some more coding ? or what else I can do to show songname ?
please give O code in the curtain pls.
@Override
public void onMetaDataReceived(String identifier, final String data) {
if ("StreamTitle".equals(identifier)) {
runOnUiThread(new Runnable() {
@Override
public void run() {
stateInfo.setText(data.toString());
}
});
}
}
hope it helps :)
I tried but unable to show song title and artist name in mainactivity using the code @Override public void onMetaDataReceived(String s, String s1) { //TODO Check metadata values. Singer name, song name or whatever you have.
Can you tell what coding should I do in this part of code for show songname and also in the notifications area. Thanks