예제 #1
0
  private void sendLocalBroadcast() {
    if (mSongSelector.getCurrentSong() != null) {
      Intent intent = new Intent(BROADCAST_PLAY_FILTER);

      intent.putExtra(EXTRA_CURRENT_SONG, mSongSelector.getCurrentSong());
      intent.putExtra(EXTRA_SONG_NUMBER, mSongSelector.getCurrentPosition());
      intent.putExtra(EXTRA_PLAYER_STATE, (Parcelable) playerState);

      LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
    }
  }
예제 #2
0
 public int getCurrentPosition() {
   return mSongSelector.getCurrentPosition();
 }