I develop a music player application.
In my application media player played a group of songs sequencely. I used a back button to stop the mediaplayer, but if the back button is used the mediaplayer does not stoped.
How to stop the mediaplayer, when I pressed a back button?
Here my code:
Intent i = new Intent(player.this, main.class);
mp.stop();
mp.release();
array1.clear();
startActivity(i);