Java Code Examples for android.hardware.fingerprint.FingerprintManager#AuthenticationResult

The following examples show how to use android.hardware.fingerprint.FingerprintManager#AuthenticationResult . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FingerprintUiHelper.java    From LolliPin with MIT License 6 votes vote down vote up
/**
 * Called by {@link FingerprintManager} if the authentication succeeded.
 */
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    mErrorTextView.removeCallbacks(mResetErrorTextRunnable);
    mIcon.setImageResource(R.drawable.ic_fingerprint_success);
    mErrorTextView.setTextColor(
            mErrorTextView.getResources().getColor(R.color.success_color, null));
    mErrorTextView.setText(
            mErrorTextView.getResources().getString(R.string.pin_code_fingerprint_success));
    mIcon.postDelayed(new Runnable() {
        @Override
        public void run() {
            mCallback.onAuthenticated();
        }
    }, SUCCESS_DELAY_MILLIS);
}
 
Example 2
Source File: FingerprintUiHelper.java    From keemob with MIT License 6 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    fingerprintResult = result;
    mErrorTextView.removeCallbacks(mResetErrorTextRunnable);
    int ic_fingerprint_success_id = mContext.getResources()
            .getIdentifier("ic_fingerprint_success", "drawable", FingerprintAuth.packageName);
    mIcon.setImageResource(ic_fingerprint_success_id);
    int success_color_id = mContext.getResources()
            .getIdentifier("success_color", "color", FingerprintAuth.packageName);
    mErrorTextView.setTextColor(
            mErrorTextView.getResources().getColor(success_color_id, null));
    int fingerprint_success_id = mContext.getResources()
            .getIdentifier("fingerprint_success", "string", FingerprintAuth.packageName);
    mErrorTextView.setText(
            mErrorTextView.getResources().getString(fingerprint_success_id));
    mIcon.postDelayed(new Runnable() {
        @Override
        public void run() {
            mCallback.onAuthenticated(fingerprintResult);
        }
    }, SUCCESS_DELAY_MILLIS);
}
 
Example 3
Source File: FingerprintUiHelper.java    From cordova-plugin-android-fingerprint-auth with Apache License 2.0 6 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    fingerprintResult = result;
    mErrorTextView.removeCallbacks(mResetErrorTextRunnable);
    int ic_fingerprint_success_id = mContext.getResources()
            .getIdentifier("ic_fingerprint_success", "drawable", FingerprintAuth.packageName);
    mIcon.setImageResource(ic_fingerprint_success_id);
    int success_color_id = mContext.getResources()
            .getIdentifier("success_color", "color", FingerprintAuth.packageName);
    mErrorTextView.setTextColor(
            mErrorTextView.getResources().getColor(success_color_id, null));
    int fingerprint_success_id = mContext.getResources()
            .getIdentifier("fingerprint_success", "string", FingerprintAuth.packageName);
    mErrorTextView.setText(
            mErrorTextView.getResources().getString(fingerprint_success_id));
    mIcon.postDelayed(new Runnable() {
        @Override
        public void run() {
            mCallback.onAuthenticated(fingerprintResult);
        }
    }, SUCCESS_DELAY_MILLIS);
}
 
Example 4
Source File: FingerprintAuthenticationDialogFragment.java    From react-native-sensitive-info with MIT License 5 votes vote down vote up
@Override
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
    // Callback from FingerprintUiHelper. Let the activity know that authentication was
    // successful.
    callbackOnAuthenticated(result);
    dismissDialog();
}
 
Example 5
Source File: FingerprintAuthenticationDialogFragment.java    From keemob with MIT License 5 votes vote down vote up
@Override
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
    // Callback from FingerprintUiHelper. Let the activity know that authentication was
    // successful.
    FingerprintAuth.onAuthenticated(true /* withFingerprint */, result);
    dismissAllowingStateLoss();
}
 
Example 6
Source File: MainActivity.java    From Sparkplug with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    Log.d(TAG, "Authentication succeeded: " +
            result.getCryptoObject().getCipher() +
            " :: " + result.getCryptoObject().getCipher().getAlgorithm() +
            " :: " + result.getCryptoObject().getCipher().getBlockSize() +
            " :: " + result.getCryptoObject().getCipher().getExemptionMechanism() +
            " :: " + result.getCryptoObject().getCipher().getIV().toString() +
            " :: " + result.getCryptoObject().getCipher().getOutputSize(100) +
            " :: " + result.getCryptoObject().getCipher().getParameters() +
            " :: " + result.getCryptoObject().getCipher().getProvider() +
            " :: " + result.getCryptoObject().getMac() +
            " :: " + result.getCryptoObject().getSignature());
}
 
Example 7
Source File: FingerprintUiHelper.java    From UAF with Apache License 2.0 5 votes vote down vote up
@Override
public void onAuthenticationSucceeded(final FingerprintManager.AuthenticationResult result) {
    mErrorTextView.removeCallbacks(mResetErrorTextRunnable);
    mIcon.setImageResource(R.drawable.ic_fingerprint_success);
    mErrorTextView.setTextColor(
            mErrorTextView.getResources().getColor(R.color.success_color, null));
    mErrorTextView.setText(
            mErrorTextView.getResources().getString(R.string.fingerprint_success));
    mIcon.postDelayed(new Runnable() {
        @Override
        public void run() {
            mCallback.onAuthenticated(result.getCryptoObject());
        }
    }, SUCCESS_DELAY_MILLIS);
}
 
Example 8
Source File: FingerprintAuthenticationDialogFragment.java    From keemob with MIT License 5 votes vote down vote up
@Override
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
    // Callback from FingerprintUiHelper. Let the activity know that authentication was
    // successful.
    FingerprintAuth.onAuthenticated(true /* withFingerprint */, result);
    dismissAllowingStateLoss();
}
 
Example 9
Source File: FingerprintAuthenticationDialogFragment.java    From keemob with MIT License 5 votes vote down vote up
@Override
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
    // Callback from FingerprintUiHelper. Let the activity know that authentication was
    // successful.
    FingerprintAuth.onAuthenticated(true /* withFingerprint */, result);
    dismissAllowingStateLoss();
}
 
Example 10
Source File: FingerprintUiHelper.java    From android-FingerprintDialog with Apache License 2.0 5 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    mErrorTextView.removeCallbacks(mResetErrorTextRunnable);
    mIcon.setImageResource(R.drawable.ic_fingerprint_success);
    mErrorTextView.setTextColor(
            mErrorTextView.getResources().getColor(R.color.success_color, null));
    mErrorTextView.setText(
            mErrorTextView.getResources().getString(R.string.fingerprint_success));
    mIcon.postDelayed(new Runnable() {
        @Override
        public void run() {
            mCallback.onAuthenticated();
        }
    }, SUCCESS_DELAY_MILLIS);
}
 
Example 11
Source File: UnlockFingerprintDialog.java    From masterpassword with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    super.onAuthenticationSucceeded(result);
    success = true;
    helpText.setText(R.string.fingerprint_dialog_success);
    cipher = result.getCryptoObject().getCipher();
    if (fingerprint != null) {
        DrawableCompat.setTint(fingerprint, Color.GREEN);
    }
}
 
Example 12
Source File: FingerprintUiHelper.java    From android-AsymmetricFingerprintDialog with Apache License 2.0 5 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    mErrorTextView.removeCallbacks(mResetErrorTextRunnable);
    mIcon.setImageResource(R.drawable.ic_fingerprint_success);
    mErrorTextView.setTextColor(
            mErrorTextView.getResources().getColor(R.color.success_color, null));
    mErrorTextView.setText(
            mErrorTextView.getResources().getString(R.string.fingerprint_success));
    mIcon.postDelayed(new Runnable() {
        @Override
        public void run() {
            mCallback.onAuthenticated();
        }
    }, SUCCESS_DELAY_MILLIS);
}
 
Example 13
Source File: FingerprintDialog.java    From SafeApp with Apache License 2.0 4 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    super.onAuthenticationSucceeded(result);
    showSuccessText();
}
 
Example 14
Source File: FingerprintHandler.java    From iGap-Android with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    this.update("Fingerprint Authentication succeeded.", true);
}
 
Example 15
Source File: FingerprintHandler.java    From programming with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    Toast.makeText(appContext, "Sucesso na autenticaĆ§Ć£o!", Toast.LENGTH_SHORT).show();
    appDialog.dismiss();
}
 
Example 16
Source File: FingerprintHandler.java    From PowerFileExplorer with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {

    materialDialog.cancel();
    decryptButtonCallbackInterface.confirm(decryptIntent);
}
 
Example 17
Source File: FingerprintHandler.java    From leafpicrevived with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
    super.onAuthenticationSucceeded(result);
    if (onFingerprintResult != null)
        onFingerprintResult.onSuccess();
}
 
Example 18
Source File: FingerprintUiHelper.java    From keemob with MIT License votes vote down vote up
void onAuthenticated(FingerprintManager.AuthenticationResult result); 
Example 19
Source File: FingerprintUiHelper.java    From react-native-sensitive-info with MIT License votes vote down vote up
void onAuthenticated(FingerprintManager.AuthenticationResult result); 
Example 20
Source File: FingerprintUiHelper.java    From keemob with MIT License votes vote down vote up
void onAuthenticated(FingerprintManager.AuthenticationResult result);