1
votes

I followed this tutorial http://code.tutsplus.com/tutorials/create-a-music-player-on-android-user-controls--mobile-22787 to build an audio player.

All works fine, but my MediaController behave oddly. In fact the controller's seekbar does not update until the user interacts with it.

I tested with API 16 to 19 without success, i have the same problem.

I tested many solution on topics i found on stackoverflow without success also.

Has anyone an idea?

1

1 Answers

0
votes

It's odd, but I found that you should update start()/pause() methods of MediaPlayerControl in such way:

@Override
public void pause() {
  musicSrv.pausePlayer();
  controller.show();
}

@Override
public void start() {
  musicSrv.go();
  controller.show();
}