i'm following a step to play audio file from here link
and it works all right, the service in the link above is to play and stop audio. The problem is i want to change a button background when the audio stop, so far i only got this in the activity that call the service:
btnPlay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (isPlaying == false) {
isPlaying = true;
btnPlay.setBackgroundResource(R.drawable.stop_play_button);
playAudio();
} else {
isPlaying = false;
btnPlay.setBackgroundResource(R.drawable.play_button);
stopAudio();
}
}
});