Пример #1
0
  public void processAddRequest(MusicItem musicItem) {
    Logger.debug(TAG, ">>>" + "processAddRequest");
    listMusic.clear();
    currentPos = 0;
    this.currentItem = musicItem;

    tryToGetAudioFocus();
    playNextSong(musicItem);
  }
Пример #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();
   }
 }