Hi, I have an app that cheks for Fingerprint on a 'not main' activity, the activity which has the app menu.
I am cheking for fingerprint in Create, it works ok but I need to check again when the user change to another app and goes back to my app.
Ive try in Pause and in Resume but because its a main menu activity it always ask for fingerprint even if the user does not goes to another app.
How to do it?
If I understand correctly, the fingerprint is asked every time.
It will be sufficient to set a boolean variable at Activity level (Sub Globals) and avoid to execute the code that asks for the fingerprint if this variable has already been set to True (i.e. operation already performed).
Store the state in a Process_Global variable (best in the starter service but not too important).
Activity Globals is not good as those variables will be reset when the activity is recreated.
Store the state in a Process_Global variable (best in the starter service but not too important).
Activity Globals is not good as those variables will be reset when the activity is recreated.
FWIW, what Ive donde is:
Global Variable "ImBack" in Main.
Each time another activity press the back key I set this variable to datetime.now
In Resume of the menu activity I check if datetime.now-ImBack is grater than 1000
If its then check biometrics
Thanks