-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FingerprintAuthenticationDialogFragment NullPointerException start nasirku #17
Comments
Juraj, I will have a look tonight but if you managed to check the issue faster, it would help... :) |
@mendreuk Hello, how do you call the code that crashes? Could you please paste some code snippet here? |
Here is a simplified LoginActivity which crashes inside authenticateUsingFingerprint() method when resumed in landscape orientation. The exception is above. public class LoginActivity {
@Override
protected void onResume() {
super.onResume();
openFingerprintIfAvailable();
}
private void openFingerprintIfAvailable() {
if (hasBiometryFactor()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
ApplicationEquaBank.getPowerAuthSDK().authenticateUsingFingerprint(this, getFragmentManager(), getString(R.string.login_fingerprint_title), getString(R.string.login_fingerprint_message), new IFingerprintActionHandler() {
@Override
public void onFingerprintDialogCancelled() {
}
@Override
public void onFingerprintDialogSuccess(@Nullable byte[] bytes) {
sendBiometryKey(bytes);
}
@Override
public void onFingerprintInfoDialogClosed() {
}
});
}
}
}
protected boolean hasBiometryFactor() {
boolean hasBiometryFactor = false;
if (isFingerprintAuthAvailable()) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
hasBiometryFactor = ApplicationEquaBank.getPowerAuthSDK().hasBiometryFactor(this);
}
}
return hasBiometryFactor;
}
protected boolean isFingerprintAuthAvailable() {
boolean isFingerprintAuthAvailable = false;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
isFingerprintAuthAvailable = FingerprintUtilities.isFingerprintAuthAvailable(this);
}
return isFingerprintAuthAvailable;
}
} |
... I am sorry, this one was dumb, I was using incorrect context object. |
Ok, works now, thanks |
Kdyz nastartuju Equa appku v orientaci na sirku a mam v aktivaci zapnuty fingerprint, tak to spadne pri otevirani dialogu na to, ze tam chybi context. Na vysku to normalne funguje.
The text was updated successfully, but these errors were encountered: