1

I have implemented login using finger print authentication and it works well.

Below is the Activity that calls the authenticate method:

FingerPrintActivity

onCreate(){
  … //Code to initialize the fingerprint manager

  FingerprintHandler fingerprintHandler = new FingerprintHandler(this);
  fingerprintHandler.startAuthentication(fingerprintManagerCompat, null);
}

FingerPrintHandler

 @Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    updateLoginUi("Successfully verified!", true);

}


private void updateLoginUi(String authenticationMessage, boolean result){
 if(result){
  context.startActivity(…)
 }
}

After successfully verifying the fingerprint, I launch the MainActivity,

however, on pressing the back button to go back to the fingerprint activity, I am unable to use the service. What do I need to activate or trigger in order to validate the fingerprint again?

LaurentY
  • 7,495
  • 3
  • 37
  • 55
Boron
  • 99
  • 10
  • 34

1 Answers1

0

You could move

  FingerprintHandler fingerprintHandler = new FingerprintHandler(this);
  fingerprintHandler.startAuthentication(fingerprintManagerCompat, null);

from onCreate() to onResume().

In this case it would start authentication everytime you go into the activity, if that is what you want.

drilonrecica
  • 327
  • 1
  • 4
  • 19