I'm using the android Deezer SDK 0.10.16 to play tracks, but I have a strange bug. If i add a playerStateChangeListener on the TrackPlayer and do some UI changes on the event PlayerState.PLAYING (like changing a text or showing a toast), the track will never start and I receive no notification of any error going on.
mDeezerPlayer.addOnPlayerStateChangeListener(new OnPlayerStateChangeListener() {
@Override
public void onPlayerStateChange(com.deezer.sdk.player.event.PlayerState playerState, long l) {
if(mEventListener != null) {
[...]
if (playerState.equals(com.deezer.sdk.player.event.PlayerState.PLAYING)) { //TODO is this equal to resume?
mEventListener.onPlayerResume(); //WARNING if we message a toast during the first PLAYING event the track does not start
}
[...]
}
}
});
FYI, the player is in a service, communicating through my listener to an activity. I can do UI changes on the other PlayerState events, but not on the first PLAYING.
Is this a bug of the SDK or am I doing something wrong? Thanks