Created
May 23, 2021 17:50
-
-
Save Iltwats/42f87a8fd9ec0aa20490480d92ce040d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Executor executor = ContextCompat.getMainExecutor(this); | |
BiometricPrompt biometricPrompt = new BiometricPrompt(this, executor, new BiometricPrompt.AuthenticationCallback() { | |
@Override | |
public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) { | |
super.onAuthenticationError(errorCode, errString); | |
viewEditAndSave(); | |
} | |
@Override | |
public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) { | |
authComplete = true; | |
viewEditAndSave(); | |
super.onAuthenticationSucceeded(result); | |
} | |
@Override | |
public void onAuthenticationFailed() { | |
super.onAuthenticationFailed(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment