If application is gone to background and come back after 5 minutes, I need to restart the app.
We can leave the restart part, how will we detect the app moving to background and to foreground? Please help.
If there is a link on details of its official impossibility or possibility, please share.
when it moves to the background it does
onPause()and when it resumes it doesonResume(), see the activity lifecycle.http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle