When restarting an Activity, onStop() from previous activity delays too much to be called.
onStop()
I am using this code to restart my activity PlayerActivit
You can do it simply by setting a noHistory flag as true in AndroidManifest.xml file. I think you don't need to keep that activity state when minimizing according to your requirement.
AndroidManifest.xml