Android Stop Audio Playing dengan siklus hidup aktivitas

@Override
    protected void onStop() {
        super.onStop();
        backgroundmusic.pause();
        length = backgroundmusic.getCurrentPosition();  
    }

@Override
    protected void onResume() {
        super.onResume();
        backgroundmusic.seekTo(length);
        backgroundmusic.start();
    }
Ismail Hossain