Advanced Methods
These are useful methods that you can use in your app to fully support Biometrics and PIN.
Enable and Disable Biometric
Cotter.initBiometricSwitch(context, fragmentActivity, activity, cotterBiometricCallback);1. Create a Callback
CotterBiometricCallback cotterBiometricCallback = new CotterBiometricCallback() {
@Override
public void onSuccess(boolean enrolled) {
res.setText("Success" + enrolled);
updateMethods();
}
@Override
public void onCanceled() {
res.setText("Canceled");
updateMethods();
}
@Override
public void onError(String s) {
res.setText("Error" + s);
updateMethods();
}
};2. Initialize Cotter Biometric
3. Enable Biometric
4. Disable Biometric
5. Checking the Enrolled status of Biometric after enable/disable
Check if Methods are Enrolled
1. Check if Biometric is available
2. Check if Biometrics is enrolled in the current device
3. Check if Pin is enrolled
Change Pin
Last updated