Skip to content

Commit

Permalink
Fix naoufal#65 (Android FingerprintManager not supported for API lowe…
Browse files Browse the repository at this point in the history
…r than 23)
  • Loading branch information
gazaret committed Mar 5, 2018
1 parent 0cf8458 commit 12ec9da
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ public String getName() {

@ReactMethod
public void isSupported(Callback reactErrorCallback, Callback reactSuccessCallback) {
keyguardManager =
(KeyguardManager) getCurrentActivity().getSystemService(Context.KEYGUARD_SERVICE);
fingerprintManager =
(FingerprintManager) getCurrentActivity().getSystemService(Context.FINGERPRINT_SERVICE);
if(!isFingerprintAuthAvailable()) {
reactErrorCallback.invoke("Not supported.");
reactErrorCallback.invoke("Not supported.");
} else {
reactSuccessCallback.invoke("Is supported.");
keyguardManager =
(KeyguardManager) getCurrentActivity().getSystemService(Context.KEYGUARD_SERVICE);
fingerprintManager =
(FingerprintManager) getCurrentActivity().getSystemService(Context.FINGERPRINT_SERVICE);
reactSuccessCallback.invoke("Is supported.");
}
return ;
}
Expand Down

0 comments on commit 12ec9da

Please sign in to comment.