Good evening!
I'm writing an android version of my application and I have little problems to understand the fingerprint logic. The code integration of fingerprint is not the problem - my problem is to understand the difference to iOS.
On iOS I use Touch-ID by every app opening from user via applicationWillEnterForeground
. For example the user press the application icon he have to authenticate with his finger. If he left the app and click the app icon again he have to authenticate also again.
I want to add this behaviour to my android app. I've looked at the android activity lifecycle ( https://www.javatpoint.com/images/androidimages/Android-Activity-Lifecycle.png ) and didn't find a good solution. I miss the similar application delegate-method applicationWillEnterForeground
from iOS. So I looked for a solution to get a similar method in android:
Both solutions doesn't work for me.
Link 1 is the idea to sum up all onResume()
methods of all activitys in a superclass. But this solution show the user the authentication dialog also "inside" the app - not only when the app is opening from user.
Link 2 is the idea to get a own application-class. The problem is that this application-class is not called when the user press the "back" / "home" button and reopen the app. Also in this case should be the authentication dialog shown.
Thanks for all answers!