Codota Logo
com.multidots.fingerprintauth
Code IndexAdd Codota to your IDE (free)

How to use com.multidots.fingerprintauth

Best Java code snippets using com.multidots.fingerprintauth (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: multidots/android-fingerprint-authentication

  @Override
  public void onClick(View v) {
    FingerPrintUtils.openSecuritySettings(MainActivity.this);
  }
});
origin: multidots/android-fingerprint-authentication

@Override
public void onAuthenticationFailed() {
  mCallback.onAuthFailed(AuthErrorCodes.CANNOT_RECOGNIZE_ERROR, null);
}
origin: multidots/android-fingerprint-authentication

@Override
protected void onPause() {
  super.onPause();
  mFingerPrintAuthHelper.stopAuth();
}
origin: multidots/android-fingerprint-authentication

if (isScanning) stopAuth();
if (!checkFingerPrintAvailability(mContext)) return;
FingerprintManager.CryptoObject cryptoObject = getCryptoObject();
if (cryptoObject == null) {
  mCallback.onAuthFailed(AuthErrorCodes.NON_RECOVERABLE_ERROR, ERROR_FAILED_TO_INIT_CHIPPER);
} else {
  mCancellationSignal = new CancellationSignal();
origin: multidots/android-fingerprint-authentication

/**
 * Check if the finger print hardware is available.
 *
 * @param context instance of the caller.
 * @return true if finger print authentication is supported.
 */
private boolean checkFingerPrintAvailability(@NonNull Context context) {
  // Check if we're running on Android 6.0 (M) or higher
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    //Fingerprint API only available on from Android 6.0 (M)
    FingerprintManagerCompat fingerprintManager = FingerprintManagerCompat.from(context);
    if (!fingerprintManager.isHardwareDetected()) {
      // Device doesn't support fingerprint authentication
      mCallback.onNoFingerPrintHardwareFound();
      return false;
    } else if (!fingerprintManager.hasEnrolledFingerprints()) {
      // User hasn't enrolled any fingerprints to authenticate with
      mCallback.onNoFingerPrintRegistered();
      return false;
    }
    return true;
  } else {
    mCallback.onBelowMarshmallow();
    return false;
  }
}
origin: multidots/android-fingerprint-authentication

boolean isKeyGenerated = generateKey();
  mCallback.onAuthFailed(AuthErrorCodes.NON_RECOVERABLE_ERROR, ERROR_FAILED_TO_GENERATE_KEY);
  return false;
} catch (NoSuchAlgorithmException |
    NoSuchPaddingException e) {
  mCallback.onAuthFailed(AuthErrorCodes.NON_RECOVERABLE_ERROR, ERROR_FAILED_TO_GENERATE_KEY);
  return false;
  return true;
} catch (KeyPermanentlyInvalidatedException e) {
  mCallback.onAuthFailed(AuthErrorCodes.NON_RECOVERABLE_ERROR, ERROR_FAILED_TO_INIT_CHIPPER);
  return false;
} catch (KeyStoreException | CertificateException
    | UnrecoverableKeyException | IOException
    | NoSuchAlgorithmException | InvalidKeyException e) {
  mCallback.onAuthFailed(AuthErrorCodes.NON_RECOVERABLE_ERROR, ERROR_FAILED_TO_INIT_CHIPPER);
  return false;
origin: multidots/android-fingerprint-authentication

  @Override
  public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    mCallback.onAuthSuccess(result.getCryptoObject());
  }
}, null);
origin: multidots/android-fingerprint-authentication

@Override
protected void onResume() {
  super.onResume();
  mGoToSettingsBtn.setVisibility(View.GONE);
  mAuthMsgTv.setText("Scan your finger");
  //start finger print authentication
  mFingerPrintAuthHelper.startAuth();
}
origin: multidots/android-fingerprint-authentication

/**
 * Get the {@link FingerPrintAuthHelper}
 *
 * @param context  instance of the caller.
 * @param callback {@link FingerPrintAuthCallback} to get notify whenever authentication success/fails.
 * @return {@link FingerPrintAuthHelper}
 */
@SuppressWarnings("ConstantConditions")
public static FingerPrintAuthHelper getHelper(@NonNull Context context, @NonNull FingerPrintAuthCallback callback) {
  if (context == null) {
    throw new IllegalArgumentException("Context cannot be null.");
  } else if (callback == null) {
    throw new IllegalArgumentException("FingerPrintAuthCallback cannot be null.");
  }
  return new FingerPrintAuthHelper(context, callback);
}
origin: multidots/android-fingerprint-authentication

@TargetApi(23)
@Nullable
private FingerprintManager.CryptoObject getCryptoObject() {
  return cipherInit() ? new FingerprintManager.CryptoObject(mCipher) : null;
}
origin: multidots/android-fingerprint-authentication

mFingerPrintAuthHelper = FingerPrintAuthHelper.getHelper(this, this);
origin: multidots/android-fingerprint-authentication

@Override
public void onAuthenticationHelp(int helpMsgId, CharSequence helpString) {
  mCallback.onAuthFailed(AuthErrorCodes.RECOVERABLE_ERROR, helpString.toString());
}
origin: multidots/android-fingerprint-authentication

@Override
public void onAuthenticationError(int errMsgId, CharSequence errString) {
  mCallback.onAuthFailed(AuthErrorCodes.NON_RECOVERABLE_ERROR, errString.toString());
}
com.multidots.fingerprintauth

Most used classes

  • FingerPrintAuthHelper
    Created by Keval on 07-Oct-16. This class will authenticate user with finger print.
  • FingerPrintAuthCallback
    Created by Keval on 07-Oct-16. This is the callback listener to notify the finger print authenticati
  • FingerPrintUtils
    Created by Keval on 07-Oct-16.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now