@Override public int getCurrentPosition() { if (musicService != null && musicBound && musicService.isPng()) { return musicService.getPosn(); } else { return 0; } }
@Override public int getDuration() { if (musicService != null && musicBound && musicService.isPng()) { return musicService.getDur(); } else { return 0; } }
public void songPicked(Song song) { int songPosn = songList.indexOf(song); musicService.setSong(songPosn); musicService.playSong(); if (playbackPaused) { setController(); playbackPaused = false; } musicController.show(0); }
@Override public boolean isPlaying() { if (musicService != null && musicBound) { return musicService.isPng(); } else { return false; } }
// play previous private void playPrev() { musicService.playPrev(); if (playbackPaused) { setController(); playbackPaused = false; } musicController.show(0); }
@Override public void seekTo(int pos) { musicService.seek(pos); }
@Override public void pause() { playbackPaused = true; musicService.pausePlayer(); }
@Override public void start() { musicService.go(); }