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 authored and markrickert committed May 1, 2018
1 parent 038dd48 commit 534c8a1
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 534c8a1

Please sign in to comment.