Skip to content

Commit 792de81

Browse files
committed
feature: add more methods
1 parent f38d50e commit 792de81

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

android/src/main/java/br/com/classapp/RNSensitiveInfo/RNSensitiveInfoModule.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,24 @@ private boolean hasSetupFingerprint() {
8787
}
8888
}
8989

90+
@ReactMethod
91+
public void isHardwareDetected(final Promise pm) {
92+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
93+
pm.resolve(mFingerprintManager.isHardwareDetected());
94+
} else {
95+
pm.resolve(false);
96+
}
97+
}
98+
99+
@ReactMethod
100+
public void hasEnrolledFingerprints(final Promise pm) {
101+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
102+
pm.resolve(mFingerprintManager.hasEnrolledFingerprints());
103+
} else {
104+
pm.resolve(false);
105+
}
106+
}
107+
90108
@ReactMethod
91109
public void isSensorAvailable(final Promise promise) {
92110
promise.resolve(hasSetupFingerprint());

0 commit comments

Comments
 (0)