1: My activity is running
2: Another app is open automatically and other app activity shown in foreground.
3: In my activity is called onPause() and onStop(). Now my activity is not in foreground but continue working threads in the background.
In this situation, if the user clicks the back button, the unknown app closes and in my app onRestart() is called.
What I need is a piece of code that allows me to programmatically call onRestart() from my background thread like user close unknown app.
Does not work for me a solution that call onCreate() in my activity.