Open suman-tms opened 7 years ago
The radio seems to break whenever you try to do anything with View inside the listener. I don't know why. Updating variable is ok, but doing changes on your view will break it. EDIT: maybe the listener cannot run on ui thread..
This is how it was here.
**@Override
public void onRadioStarted() {
runOnUiThread(new Runnable() {
@Override
public void run() {
nomeMusica.setText("Reproduzindo Áudio...");
findViewById(R.id.iv_player).setBackgroundResource(R.drawable.action_pause);
}
});
}**
When i add some code after listener the radio wont play. Like when i try to do something like add a toast messge inside onMetaDataReceived. The app doesnt play anything and when i remove it. It works fine. Can someone help me.
public class MainActivity extends Activity implements RadioListener ... @Override public void onRadioStarted() {