Hi
I looking to implement password protection in my app but I am struggling to find the best place to do this.
Obviously I will check in the main activities Activity_Create sub when FirstTime is true but my problem is when the user does something like presses the home button, runs another app and then comes back to my app. Activity_Create is not called so I must look at Activity_Resume. Problem with Activity_Resume is that it is called everytime the user navigates back to the main screen.
So is there anyway I can detect that my app has lost focus so I could set a flag to get the user to enter the password again?
I looking to implement password protection in my app but I am struggling to find the best place to do this.
Obviously I will check in the main activities Activity_Create sub when FirstTime is true but my problem is when the user does something like presses the home button, runs another app and then comes back to my app. Activity_Create is not called so I must look at Activity_Resume. Problem with Activity_Resume is that it is called everytime the user navigates back to the main screen.
So is there anyway I can detect that my app has lost focus so I could set a flag to get the user to enter the password again?