I want the user to enter a password every time he tries to enter the application. That is, the user must enter the password each time the application comes to the forefront from the background, for example, by clicking the start icon or by pressing the main key
I sorted the first part because the intent of the launch was starting, and I get a callback in onRestart of this action.
But with a long press of the master key and starting, the onRestart callback is not provided.
Also, if the user launches the application by clicking the notification , the notification panel. How can I tell if the application was originally in the background or before the user clicked a notification
source
share