I have an android app and for security reasons it can never be left on while a user is not using it. How can I restart my app when the user locks the screen or it auto locks.
When the user unlocks the device is should be at the login activity.
Can I clear all tasks when the screen is locked. How is this done?
Update
I cannot finish() activities in the onPause as i use onPause for NFC foregroundDispatch so i need a different solution