In AudioPlayer.java add method pause() and revise play() to use existing player. In HelloMoonFragment.java add mPauseButton and call setOnClickListener.