/** * Start a fingerprint authentication request. * <p/> * If {@link #isHardwarePresent()} or {@link #hasFingerprintRegistered()} return false, no * authentication will take place, and the listener's {@link AuthenticationListener#onFailure(AuthenticationFailureReason, * boolean, CharSequence, int, int)} will immediately be called with the corresponding failure * reason. In this case, errorMessage will be non-null, fatal will be true, and the other values * are unspecified. * * @param listener The listener that will be notified of authentication events. * @param restartPredicate A predicate that will be called after each failure. If it returns * true, the fingerprint sensor will remain active and the listener will * not be called. If it returns false, the sensor will be turned off and * onFailure will be called. */ public static void authenticate(AuthenticationListener listener, RestartPredicate restartPredicate) { ReprintInternal.INSTANCE.authenticate(listener, restartPredicate); }
/** * Start a fingerprint authentication request. * <p/> * This variant will not restart the fingerprint reader after any failure, including non-fatal * failures. * * @param listener The listener that will be notified of authentication events. */ public static void authenticateWithoutRestart(AuthenticationListener listener) { ReprintInternal.INSTANCE.authenticate(listener, RestartPredicates.neverRestart()); }