EDIT - FOUND A EASY 5-10 LINE SOLUTION!!! See MY OWN ANSWER BELOW!!! YAY!!!!!!!!!
I\'ve searched for 5 hours, dozens of SO posts, no answers, and this seems like t
I have encountered the same problem with my development proccess.
I solved this by using onPause and onResume and with pause() and start() methods in the player which I saved on my main container, calling fragments instead of activities.
I kept a flag on a singleton in order to know when the music was turned off by the user.
Another problem I found is that my app (idk if it's part of the android build or not) was running the onResume method right before he got the player back on, so I ran a while loop in order to receive the player not as a null pointer, and it works because it runs on a different thread, therefore enabling the app to run the onResume without crashing and the music alongside it.
I find it better (smaller code to write) and non-permission invasive ;).