Exemplo n.º 1
0
 @Override
 public void onPrepared(MediaPlayer mediaPlayer) {
   Logger.debug(TAG, ">>>" + "onPrepared");
   if (musicPlayBackCallback != null) {
     musicPlayBackCallback.onPlaying(currentItem);
   }
   mState = State.Playing;
   updateNotification(currentItem);
   configAndStartMediaPlayer();
 }
Exemplo n.º 2
0
 public void processPlayRequest() {
   Logger.debug(TAG, ">>>" + "processPlayRequest");
   tryToGetAudioFocus();
   if (mState == State.Stopped) {
     if (!listMusic.isEmpty() && currentItem != null) {
       currentItem = listMusic.get(currentPos);
       playNextSong(currentItem);
     }
   } else if (mState == State.Paused) {
     mState = State.Playing;
     setupAsForeGround(currentItem);
     configAndStartMediaPlayer();
   }
 }