I need my app to restart whenever it is brought in from the OS background, so the user is required to log in again.
I tried to use finishAffinity()
in my onPause()
of activity, the problem is that this method is also called when there is a transition between activities
, causing that when OnBackPressed
was called the application would also restart .