react-native-biometric-verifier 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -17,4 +17,12 @@ A comprehensive biometric verification module for React Native that combines fac
|
|
|
17
17
|
```bash
|
|
18
18
|
npm install react-native-biometric-verifier
|
|
19
19
|
# or
|
|
20
|
-
yarn add react-native-biometric-verifier
|
|
20
|
+
yarn add react-native-biometric-verifier
|
|
21
|
+
|
|
22
|
+
#<BiometricModal
|
|
23
|
+
#data={response?.data?.userdata?.hrenemp}
|
|
24
|
+
#apiurl={"http://his.amalaims.org:9090/"}
|
|
25
|
+
#livenessLevel={1}
|
|
26
|
+
#onclose={i =>{setResponse(i)}}
|
|
27
|
+
#qrscan={response?.data?.userdata?.qrscan}
|
|
28
|
+
#callback={() => {actionLogin(response);}}/>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-biometric-verifier",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"description": "A React Native module for biometric verification with face recognition and QR code scanning",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"face-recognition",
|
|
14
14
|
"qr-code"
|
|
15
15
|
],
|
|
16
|
-
"author": "
|
|
17
|
-
"license": "
|
|
16
|
+
"author": "PRAFULDAS M M",
|
|
17
|
+
"license": "JESCON TECHNOLOGIES PVT",
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
20
20
|
"react-native": ">=0.60.0",
|
|
@@ -34,7 +34,6 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
34
34
|
const [isInitializing, setIsInitializing] = useState(true);
|
|
35
35
|
|
|
36
36
|
const [faces, setFaces] = useState([]);
|
|
37
|
-
const [cameraError, setCameraError] = useState(null);
|
|
38
37
|
const [livenessStep, setLivenessStep] = useState(0);
|
|
39
38
|
const [blinkCount, setBlinkCount] = useState(0);
|
|
40
39
|
const [progress, setProgress] = useState(0);
|
|
@@ -64,7 +63,6 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
64
63
|
}
|
|
65
64
|
} catch (error) {
|
|
66
65
|
console.error('Error processing scanned code:', error);
|
|
67
|
-
setCameraError('Failed to process QR code');
|
|
68
66
|
}
|
|
69
67
|
},
|
|
70
68
|
});
|
|
@@ -106,7 +104,6 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
106
104
|
console.error('Capture error:', e);
|
|
107
105
|
captured.current = false;
|
|
108
106
|
resetCaptureState();
|
|
109
|
-
setCameraError('Failed to capture image. Please try again.');
|
|
110
107
|
}
|
|
111
108
|
},
|
|
112
109
|
[onCapture, resetCaptureState]
|
|
@@ -176,7 +173,6 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
176
173
|
if (!isMounted.current) return;
|
|
177
174
|
|
|
178
175
|
setIsInitializing(true);
|
|
179
|
-
setCameraError(null);
|
|
180
176
|
setShowCamera(false);
|
|
181
177
|
|
|
182
178
|
const newCameraPermission = await Camera.requestCameraPermission();
|
|
@@ -201,11 +197,9 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
201
197
|
setShowCamera(true);
|
|
202
198
|
console.log('Camera device set successfully');
|
|
203
199
|
} else {
|
|
204
|
-
setCameraError('Camera permission denied');
|
|
205
200
|
}
|
|
206
201
|
} catch (error) {
|
|
207
202
|
console.error('Camera permission error:', error);
|
|
208
|
-
setCameraError(error.message || 'Failed to get camera permission');
|
|
209
203
|
setShowCamera(false);
|
|
210
204
|
} finally {
|
|
211
205
|
if (isMounted.current) {
|
|
@@ -274,7 +268,6 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
274
268
|
|
|
275
269
|
const handleRetry = useCallback(async () => {
|
|
276
270
|
try {
|
|
277
|
-
setCameraError(null);
|
|
278
271
|
setShowCamera(false);
|
|
279
272
|
setCameraInitialized(false);
|
|
280
273
|
forceResetCaptureState();
|
|
@@ -282,7 +275,6 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
282
275
|
await initializeCamera();
|
|
283
276
|
} catch (error) {
|
|
284
277
|
console.error('Retry failed:', error);
|
|
285
|
-
setCameraError('Failed to retry camera initialization');
|
|
286
278
|
}
|
|
287
279
|
}, [initializeCamera, resetCaptureState, forceResetCaptureState]);
|
|
288
280
|
|
|
@@ -392,6 +384,8 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
392
384
|
photo={true}
|
|
393
385
|
format={format}
|
|
394
386
|
codeScanner={showCodeScanner ? codeScanner : undefined}
|
|
387
|
+
enableZoomGesture={false}
|
|
388
|
+
lowLightBoost={cameraDevice.supportsLowLightBoost}
|
|
395
389
|
frameProcessor={
|
|
396
390
|
!showCodeScanner && cameraInitialized ? frameProcessor : undefined
|
|
397
391
|
}
|
|
@@ -403,6 +397,10 @@ const CaptureImageWithoutEdit = React.memo(
|
|
|
403
397
|
onError={(error) => {
|
|
404
398
|
console.log('Camera error:', error);
|
|
405
399
|
}}
|
|
400
|
+
exposure={0}
|
|
401
|
+
pixelFormat="yuv"
|
|
402
|
+
preset="medium"
|
|
403
|
+
orientation="portrait"
|
|
406
404
|
/>
|
|
407
405
|
) : (
|
|
408
406
|
<View style={styles.placeholderContainer}>
|
|
@@ -134,7 +134,6 @@ export const useFaceDetectionFrameProcessor = ({
|
|
|
134
134
|
const frameProcessor = useFrameProcessor(
|
|
135
135
|
(frame) => {
|
|
136
136
|
'worklet';
|
|
137
|
-
console.log('qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq',JSON.stringify(frame))
|
|
138
137
|
const state = sharedState.value;
|
|
139
138
|
|
|
140
139
|
// quick exits — do not call frame.release here; we'll release in finally
|