下面列出了android.hardware.fingerprint.FingerprintManager#AuthenticationResult ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* 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);
}
@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);
}
@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);
}
@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);
}
@Override
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
// Callback from FingerprintUiHelper. Let the activity know that authentication was
// successful.
callbackOnAuthenticated(result);
dismissDialog();
}
@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);
}
@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);
}
}
@Override
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
// Callback from FingerprintUiHelper. Let the activity know that authentication was
// successful.
FingerprintAuth.onAuthenticated(true /* withFingerprint */, result);
dismissAllowingStateLoss();
}
@Override
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
// Callback from FingerprintUiHelper. Let the activity know that authentication was
// successful.
FingerprintAuth.onAuthenticated(true /* withFingerprint */, result);
dismissAllowingStateLoss();
}
@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);
}
@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());
}
@Override
public void onAuthenticated(FingerprintManager.AuthenticationResult result) {
// Callback from FingerprintUiHelper. Let the activity know that authentication was
// successful.
FingerprintAuth.onAuthenticated(true /* withFingerprint */, result);
dismissAllowingStateLoss();
}
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
super.onAuthenticationSucceeded(result);
showSuccessText();
}
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
super.onAuthenticationSucceeded(result);
if (onFingerprintResult != null)
onFingerprintResult.onSuccess();
}
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
materialDialog.cancel();
decryptButtonCallbackInterface.confirm(decryptIntent);
}
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
Toast.makeText(appContext, "Sucesso na autenticação!", Toast.LENGTH_SHORT).show();
appDialog.dismiss();
}
@Override
public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) {
this.update("Fingerprint Authentication succeeded.", true);
}
void onAuthenticated(FingerprintManager.AuthenticationResult result);
void onAuthenticated(FingerprintManager.AuthenticationResult result);
void onAuthenticated(FingerprintManager.AuthenticationResult result);