I want to lock my application when it goes in background and
when it resumes I want to display my own lock screen. The lock screen is an Activity of my application.
After successfully entring password the user can see the resumed Activity
else he can’t.
How can I do this?
You can achieve that if you have a global Activity “MyActivity” and all the activities extend from it.
Then you override onPause and onStop methods on “MyActivity”
and:
EDIT: Obviously you need to create the methods setLockStatus and checkLockScreen and do whatever you want (like save the status on sharedPreferences).