In my app, I want a media file to play, and to keep playing if the user rotates the screen (destroying the Activity), but I want it to stop playing if the user moves to a differ
You can also try using View#onConfigurationChanged in case its applicable in your case(i.e - you have a view for your media player and have a reference to it in the view).