Class BiometricsDialogManager
- java.lang.Object
-
- com.cheetahdigital.authentication.ui.biometrics.BiometricsDialogManager
-
public class BiometricsDialogManager extends java.lang.Object
Manager class for displaying of authentication fingerprint user dialog
-
-
Constructor Summary
Constructors Constructor Description BiometricsDialogManager(RegisterBiometricsListener listener)
Constructor forBiometricsDialogManager
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
show(androidx.appcompat.app.AppCompatActivity activity, boolean forRegistration, java.lang.String title, java.lang.String subtitle, java.lang.String description, java.lang.String negativeButtonText, AuthenticationCallback authenticationCallback, androidx.biometric.BiometricPrompt.CryptoObject cryptoObject)
Shows the biometric promptvoid
showBiometricsAlreadyRegisteredDialog(android.app.Activity activity, android.content.DialogInterface.OnClickListener okListener)
Show Fingerprint is already registered dialogstatic void
showDisableBiometricsDialog(android.app.Activity activity)
Show Disable Fingerprint Dialog.static void
showEnableBiometricsDialog(android.app.Activity activity)
Show enable fingerprint authentication dialog.void
showNextTimeUsingBiometricsDialog(android.app.Activity activity)
Show Login via Fingerprint, would you like to login via fingerprint dialogvoid
showRegisterUsingBiometricsDialog()
Show the Register your fingerprint dialog/ It will start to call theRegisterBiometricsListener.onStartBiometricAuth()
-
-
-
Constructor Detail
-
BiometricsDialogManager
public BiometricsDialogManager(@NonNull RegisterBiometricsListener listener)
Constructor forBiometricsDialogManager
- Parameters:
listener
-RegisterBiometricsListener
-
-
Method Detail
-
showRegisterUsingBiometricsDialog
public void showRegisterUsingBiometricsDialog()
Show the Register your fingerprint dialog/ It will start to call theRegisterBiometricsListener.onStartBiometricAuth()
-
showBiometricsAlreadyRegisteredDialog
public void showBiometricsAlreadyRegisteredDialog(android.app.Activity activity, android.content.DialogInterface.OnClickListener okListener)
Show Fingerprint is already registered dialog- Parameters:
activity
- view where the alert dialog is shownokListener
-DialogInterface.OnClickListener
when on is clicked
-
showNextTimeUsingBiometricsDialog
public void showNextTimeUsingBiometricsDialog(android.app.Activity activity)
Show Login via Fingerprint, would you like to login via fingerprint dialog- Parameters:
activity
- view where the alert dialog is shown
-
showDisableBiometricsDialog
public static void showDisableBiometricsDialog(android.app.Activity activity)
Show Disable Fingerprint Dialog. If yes, it will clear biometric data on Shared preferences- Parameters:
activity
- view where the alert dialog is shown
-
showEnableBiometricsDialog
public static void showEnableBiometricsDialog(android.app.Activity activity)
Show enable fingerprint authentication dialog.- Parameters:
activity
- view where the alert dialog is shown
-
show
public static void show(androidx.appcompat.app.AppCompatActivity activity, boolean forRegistration, java.lang.String title, java.lang.String subtitle, java.lang.String description, java.lang.String negativeButtonText, AuthenticationCallback authenticationCallback, androidx.biometric.BiometricPrompt.CryptoObject cryptoObject)
Shows the biometric prompt- Parameters:
activity
- page where the prompt is attachedforRegistration
- determine if biometric is intended for registrationtitle
- title shown on the dialogsubtitle
- subtitle shown on the dialogdescription
- description shown on the dialognegativeButtonText
- text used for negative button of the dialogauthenticationCallback
- callback to receive authentication eventscryptoObject
- The crypto object associated with the authentication
-
-