Android Stop Background Music
I’m very happy today, and still have hair 🙂 I’ve tested this and it works!!! First, add this to your Manifest: <uses-permission android:name=”android.permission.GET_TASKS”/> Second, add this to your ‘Home/Main’ Activity/Class: @Override protected void onPause() { if (this.isFinishing()){ //basically BACK was pressed from this activity player.stop(); Toast.makeText(xYourClassNamex.this, “YOU PRESSED BACK FROM YOUR ‘HOME/MAIN’ ACTIVITY”, Toast.LENGTH_SHORT).show(); } … Read more