react-native-rdservice-fingerprintscanner 1.2.0 → 1.2.1
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 +55 -26
- package/android/src/main/java/com/rdservicefingerprintscanner/RDServiceEvents.java +13 -0
- package/android/src/main/java/com/rdservicefingerprintscanner/RDServiceManager.java +24 -0
- package/android/src/main/java/com/rdservicefingerprintscanner/RdserviceFingerprintscannerModule.java +45 -0
- package/lib/commonjs/index.d.js.map +1 -1
- package/lib/commonjs/index.js +22 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.d.js.map +1 -1
- package/lib/module/index.js +21 -0
- package/lib/module/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.d.ts +25 -15
- package/src/index.js +24 -0
- package/react-native-rdservice-fingerprintscanner.podspec +0 -41
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
captureFinger,
|
|
34
34
|
isDriverFound,
|
|
35
35
|
openFingerPrintScanner,
|
|
36
|
+
captureFace,
|
|
36
37
|
AVAILABLE_PACKAGES,
|
|
37
38
|
DEFAULT_PID_OPTIONS,
|
|
38
39
|
} from 'react-native-rdservice-fingerprintscanner';
|
|
@@ -47,7 +48,7 @@ getDeviceInfo()
|
|
|
47
48
|
console.log(error, 'DEVICE DRIVER NOT FOUND'); //Failed to get device information
|
|
48
49
|
});
|
|
49
50
|
|
|
50
|
-
captureFinger(pidOptions) //
|
|
51
|
+
captureFinger(pidOptions) // You can pass pidOptions (optional) to the "captureFinger" method; otherwise, it will use DEFAULT_PID_OPTIONS.
|
|
51
52
|
.then((response) => {
|
|
52
53
|
console.log(response, 'FINGER CAPTURE'); // FingerPrint Response
|
|
53
54
|
})
|
|
@@ -55,7 +56,7 @@ captureFinger(pidOptions) //you can pass pidOptions (optional) to "captureFinger
|
|
|
55
56
|
console.log(e, 'ERROR_FINGER_CAPTURE'); // Failed to capture the Fingerprint
|
|
56
57
|
});
|
|
57
58
|
|
|
58
|
-
isDriverFound(PACKAGE_NAME) //
|
|
59
|
+
isDriverFound(PACKAGE_NAME) // You can use "AVAILABLE_PACKAGES" for the PACKAGE_NAME
|
|
59
60
|
.then((res) => {
|
|
60
61
|
console.log(res, 'DRIVER CHECK');
|
|
61
62
|
})
|
|
@@ -63,56 +64,84 @@ isDriverFound(PACKAGE_NAME) // you can use AVAILABLE_PACKAGES for PACKAGE_NAME
|
|
|
63
64
|
console.log(error, 'ERROR_DRIVER CHECK');
|
|
64
65
|
});
|
|
65
66
|
|
|
66
|
-
openFingerPrintScanner(PACKAGE_NAME, pidOptions) //
|
|
67
|
+
openFingerPrintScanner(PACKAGE_NAME, pidOptions) // You can pass pidOptions (optional) to the "openFingerPrintScanner" method; otherwise, it will use DEFAULT_PID_OPTIONS
|
|
67
68
|
.then((res) => {
|
|
68
69
|
console.log(res, 'FINGER CAPTURE');
|
|
69
70
|
})
|
|
70
71
|
.catch((e) => {
|
|
71
72
|
console.log(e, 'ERROR_FINGER_CAPTURE');
|
|
72
73
|
});
|
|
74
|
+
|
|
75
|
+
captureFace(pidOptions) // You should pass pidOptions to the "captureFace" method. The DEFAULT_PID_OPTIONS will not work for this method
|
|
76
|
+
.then((response) => {
|
|
77
|
+
console.log(response, 'FACE CAPTURE'); // Face Response
|
|
78
|
+
})
|
|
79
|
+
.catch((e) => {
|
|
80
|
+
console.log(e, 'ERROR_FACE_CAPTURE'); // Failed to capture the Face
|
|
81
|
+
});
|
|
73
82
|
```
|
|
74
83
|
|
|
75
|
-
|
|
84
|
+
## Using pidOptions and RD Service Methods
|
|
85
|
+
|
|
86
|
+
`pidOptions` is an XML string that you need to pass to the `captureFinger`, `openFingerPrintScanner` and `captureFace` methods.
|
|
76
87
|
|
|
77
|
-
|
|
88
|
+
Refer to Version 2.0 of UIDAI [Revision 6](https://uidai.gov.in/images/resource/Aadhaar_Registered_Devices_2_0_4.pdf) and [Revision 7](https://uidai.gov.in/images/resource/Aadhaar_Registered_Devices_2_0_Revision-7_of_Jan_2022.pdf) documents for `pidOptions` used in `captureFinger` and `openFingerPrintScanner` methods.
|
|
89
|
+
|
|
90
|
+
The `pidOptions` passed to the `captureFace` method should include the wadh value, which is an encrypted hash key encoded in Base64.
|
|
91
|
+
|
|
92
|
+
Refer to Version 2.5 of UIDAI [Revision 1](https://uidai.gov.in/images/resource/Aadhaar_Authentication_API-2.5_Revision-1_of_January_2022.pdf) document for `pidOptions` used in `captureFace` method.
|
|
93
|
+
|
|
94
|
+
`DEFAULT_PID_OPTIONS` is used when you not passed the `pidOptions` to the `captureFinger()` and `openFingerPrintScanner` Methods.
|
|
78
95
|
|
|
79
96
|
`PACKAGE_NAME` is required to check the rd service. (eg) The Package name of StarTek Device is `com.acpl.registersdk`
|
|
80
97
|
|
|
81
98
|
You can use `AVAILABLE_PACKAGES` for `PACKAGE_NAME`.
|
|
82
99
|
|
|
83
|
-
`Note
|
|
100
|
+
`Note`: Call the `captureFinger` method after receiving a response from the `getDeviceInfo` method. Calling `captureFinger` before `getDeviceInfo` will only return an error in the catch block [(refer to the example code)](https://github.com/senthalan2/react-native-rdservice-fingerprintscanner/blob/main/example/src/App.js). Call the `openFingerPrintScanner` method only after the `isDriverFound` method returns true; if the driver is not found, `openFingerPrintScanner` will return a driver not found error. The two methods `isDriverFound` and `openFingerPrintScanner` are used to locate the selected RD Service, which is passed as an argument (device driver package name) to these methods. The [AadhaarFaceRD](https://play.google.com/store/apps/details?id=in.gov.uidai.facerd&hl=en) app must be installed to use the `captureFace` method.
|
|
84
101
|
|
|
85
102
|
## Response JSON Object
|
|
86
103
|
|
|
87
104
|
`getDeviceInfo()` Method Reponse
|
|
88
105
|
|
|
89
|
-
| Key
|
|
90
|
-
|
|
|
91
|
-
| status
|
|
92
|
-
| isWhitelisted | true or false
|
|
93
|
-
| rdServiceInfoJson | JSON DATA
|
|
94
|
-
| rdServiceInfoXML | XML DATA
|
|
95
|
-
| rdServicePackage | Device Package
|
|
106
|
+
| Key | Value | Description |
|
|
107
|
+
| ---------- | ------- | ------------ |
|
|
108
|
+
| status | -1 or 1 or 0 | `-1` - Device Driver not Found, `1` - READY, `0` - NOTREADY |
|
|
109
|
+
| isWhitelisted | true or false | IT is about the Device is Approved or not. `true` - Approved, `false` - Not Approved |
|
|
110
|
+
| rdServiceInfoJson | JSON DATA | The device returns XML DATA of Device Information. this parameter contains converted JSON DATA of XML DATA |
|
|
111
|
+
| rdServiceInfoXML | XML DATA | Device Information |
|
|
112
|
+
| rdServicePackage | Device Package |
|
|
96
113
|
| message | Message about Success or Failure |
|
|
97
114
|
|
|
98
115
|
`captureFinger()` and `openFingerPrintScanner()` Methods Reponse
|
|
99
116
|
|
|
100
|
-
| Key
|
|
101
|
-
|
|
|
102
|
-
| status
|
|
103
|
-
| errorCode
|
|
104
|
-
| errInfo
|
|
105
|
-
| pidDataJson
|
|
106
|
-
| pidDataXML
|
|
107
|
-
| rdServicePackage | Device Package
|
|
108
|
-
| message
|
|
117
|
+
| Key | Value | Description |
|
|
118
|
+
| ---- | ------- | ----------- |
|
|
119
|
+
| status | 1 or 0 | `1` - Fingerprint Captured Successfully, `0` - FingerPrint not Captured (Check Connection of Device and OTG Connection Settings in Mobile) |
|
|
120
|
+
| errorCode | ERROR CODE from RD Service | Refer [UIDAI Document](https://uidai.gov.in/images/resource/Aadhaar_Registered_Devices_2_0_Revision-7_of_Jan_2022.pdf) and [RDService Error Details](https://github.com/senthalan2/react-native-rdservice-fingerprintscanner/blob/main/Assets/RDService_Error_Details.pdf) |
|
|
121
|
+
| errInfo | Error Message according to the ERROR CODE | Refer [UIDAI Document](https://uidai.gov.in/images/resource/Aadhaar_Registered_Devices_2_0_Revision-7_of_Jan_2022.pdf) and [RDService Error Details](https://github.com/senthalan2/react-native-rdservice-fingerprintscanner/blob/main/Assets/RDService_Error_Details.pdf) |
|
|
122
|
+
| pidDataJson | JSON DATA | The device returns PID DATA of Captured Fingerprint. this parameter contains converted JSON pidData of XML pidData |
|
|
123
|
+
| pidDataXML | XML DATA | pidData Captured Fingerprint
|
|
124
|
+
| rdServicePackage | Device Package |
|
|
125
|
+
| message | Message about Success or Failure |
|
|
109
126
|
|
|
110
127
|
`isDriverFound()` Method Response
|
|
111
128
|
|
|
112
|
-
| Key | Value
|
|
113
|
-
| ------------------- |
|
|
114
|
-
| isDeviceDriverFound | true or false
|
|
115
|
-
| message
|
|
129
|
+
| Key | Value | Description |
|
|
130
|
+
| ------------------- | -------- | ---------- |
|
|
131
|
+
| isDeviceDriverFound | true or false | `true` - Driver Found, `false` - Driver not found |
|
|
132
|
+
| message | Message about the driver found or not |
|
|
133
|
+
|
|
134
|
+
`captureFace()` method Reponse
|
|
135
|
+
|
|
136
|
+
| Key | Value | Description |
|
|
137
|
+
| ---------------- | ------------------ | --------- |
|
|
138
|
+
| status | 1 or 0 | `1` - Face Captured Successfully, `0` - Face not Captured |
|
|
139
|
+
| errorCode | ERROR CODE from RD Service | Refer [UIDAI Document](https://uidai.gov.in/images/resource/Aadhaar_Authentication_API-2.5_Revision-1_of_January_2022.pdf) |
|
|
140
|
+
| errInfo | Error Message according to the ERROR CODE | Refer [UIDAI Document](https://uidai.gov.in/images/resource/Aadhaar_Authentication_API-2.5_Revision-1_of_January_2022.pdf) |
|
|
141
|
+
| pidDataJson | JSON DATA | The [AadhaarFaceRD](https://play.google.com/store/apps/details?id=in.gov.uidai.facerd&hl=en) app returns PID data of the captured face. This parameter contains the JSON-converted version of the XML PID data |
|
|
142
|
+
| pidDataXML | XML DATA | PID data of the captured face |
|
|
143
|
+
| message | Message about Success or Failure |
|
|
144
|
+
|
|
116
145
|
|
|
117
146
|
## Tested Devices
|
|
118
147
|
|
|
@@ -22,6 +22,12 @@ public interface RDServiceEvents {
|
|
|
22
22
|
*/
|
|
23
23
|
void onRDServiceCaptureResponse(String pidData, String rdServicePackage);
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* A face scan data is received from the FaceRD.
|
|
27
|
+
* @param pidData The face scan PID data as XML string
|
|
28
|
+
*/
|
|
29
|
+
void onRDServiceFaceCaptureResponse(String pidData);
|
|
30
|
+
|
|
25
31
|
/**
|
|
26
32
|
* No installed RDService driver was found.
|
|
27
33
|
*/
|
|
@@ -43,5 +49,12 @@ public interface RDServiceEvents {
|
|
|
43
49
|
*/
|
|
44
50
|
void onRDServiceCaptureFailed(int resultCode, Intent data, String rdServicePackage);
|
|
45
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Captured request sent to an RDService face capture failed.
|
|
54
|
+
* @param resultCode The resultCode returned by the FaceRD
|
|
55
|
+
* @param data The data returned by the FaceRD activity
|
|
56
|
+
*/
|
|
57
|
+
void onRDServiceFaceCaptureFailed(int resultCode, Intent data);
|
|
58
|
+
|
|
46
59
|
void onDeviceDriverFound(Boolean isFound);
|
|
47
60
|
}
|
|
@@ -28,6 +28,7 @@ public class RDServiceManager {
|
|
|
28
28
|
private static final int RC_RDSERVICE_CAPTURE_START_INDEX = 8300;
|
|
29
29
|
|
|
30
30
|
private static final int FINGERPRINT_SCANNER_CAPTURE = 8761;
|
|
31
|
+
private static final int FACE_SCANNER_CAPTURE = 8762;
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
private static final Map<String, Integer> mapRDDriverRCIndex = new HashMap<String, Integer>();
|
|
@@ -142,6 +143,14 @@ public class RDServiceManager {
|
|
|
142
143
|
mRDEvent.onRDServiceCaptureFailed(resultCode, data, rdservice_pkg_name); // Fingerprint Capture Failed
|
|
143
144
|
}
|
|
144
145
|
}
|
|
146
|
+
else if(requestCode == FACE_SCANNER_CAPTURE){
|
|
147
|
+
if(resultCode == RESULT_OK){
|
|
148
|
+
onRDServiceFaceCaptureIntentResponse(data);
|
|
149
|
+
}
|
|
150
|
+
else{
|
|
151
|
+
mRDEvent.onRDServiceFaceCaptureFailed(resultCode, data);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
145
154
|
}
|
|
146
155
|
|
|
147
156
|
|
|
@@ -258,6 +267,13 @@ public class RDServiceManager {
|
|
|
258
267
|
}
|
|
259
268
|
}
|
|
260
269
|
|
|
270
|
+
public void captureFace(@NonNull String pid_options,Activity activity){
|
|
271
|
+
Intent intent = new Intent("in.gov.uidai.rdservice.face.CAPTURE");
|
|
272
|
+
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
|
273
|
+
intent.putExtra("request", pid_options);
|
|
274
|
+
activity.startActivityForResult(intent, FACE_SCANNER_CAPTURE);
|
|
275
|
+
}
|
|
276
|
+
|
|
261
277
|
|
|
262
278
|
/**
|
|
263
279
|
* Process response RDService driver status info.
|
|
@@ -293,6 +309,14 @@ public class RDServiceManager {
|
|
|
293
309
|
}
|
|
294
310
|
}
|
|
295
311
|
|
|
312
|
+
private void onRDServiceFaceCaptureIntentResponse(@NonNull Intent data) {
|
|
313
|
+
Bundle b = data.getExtras();
|
|
314
|
+
|
|
315
|
+
if (b != null) {
|
|
316
|
+
mRDEvent.onRDServiceFaceCaptureResponse(b.getString("response", ""));
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
296
320
|
|
|
297
321
|
/**
|
|
298
322
|
* Generate and return the next result-code for RDService driver discovery
|
package/android/src/main/java/com/rdservicefingerprintscanner/RdserviceFingerprintscannerModule.java
CHANGED
|
@@ -68,6 +68,13 @@ public class RdserviceFingerprintscannerModule extends ReactContextBaseJavaModul
|
|
|
68
68
|
rdServiceManager.captureRdService(servicePackage,pidOptions,activity);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
@ReactMethod
|
|
72
|
+
public void captureFace(String pidOptions, Promise promise) {
|
|
73
|
+
this.promise = promise;
|
|
74
|
+
final Activity activity = getCurrentActivity();
|
|
75
|
+
rdServiceManager.captureFace(pidOptions,activity);
|
|
76
|
+
}
|
|
77
|
+
|
|
71
78
|
|
|
72
79
|
@Override
|
|
73
80
|
public void onDeviceDriverFound(Boolean isFound) {
|
|
@@ -148,6 +155,39 @@ public class RdserviceFingerprintscannerModule extends ReactContextBaseJavaModul
|
|
|
148
155
|
}
|
|
149
156
|
}
|
|
150
157
|
|
|
158
|
+
@Override
|
|
159
|
+
public void onRDServiceFaceCaptureResponse(String pidData) {
|
|
160
|
+
|
|
161
|
+
XmlToJson xmlToJson = new XmlToJson.Builder(pidData).build();
|
|
162
|
+
String jsonString = xmlToJson.toString();
|
|
163
|
+
|
|
164
|
+
try{
|
|
165
|
+
JSONObject obj = new JSONObject(jsonString);
|
|
166
|
+
JSONObject response = obj.getJSONObject("PidData").getJSONObject("Resp");
|
|
167
|
+
String errorCode = response.getString("errCode");
|
|
168
|
+
String errInfo = "";
|
|
169
|
+
WritableMap responseData = Arguments.createMap();
|
|
170
|
+
if(Integer.parseInt(errorCode) == 0 ){
|
|
171
|
+
responseData.putInt("status",1);
|
|
172
|
+
responseData.putString("message","Face Captured Successfully");
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
errInfo = response.getString("errInfo");
|
|
176
|
+
responseData.putInt("status",0);
|
|
177
|
+
responseData.putString("message",errInfo);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
responseData.putString("errorCode",errorCode);
|
|
181
|
+
responseData.putString("errInfo",errInfo);
|
|
182
|
+
responseData.putString("pidDataJsonString", jsonString);
|
|
183
|
+
responseData.putString("pidDataXML", pidData);
|
|
184
|
+
promise.resolve(responseData);
|
|
185
|
+
}
|
|
186
|
+
catch (JSONException e){
|
|
187
|
+
promise.reject("FACE_CAPTURE_FAILED", "Face Capture Failed");
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
151
191
|
@Override
|
|
152
192
|
public void onRDServiceDriverNotFound() {
|
|
153
193
|
// Called when no installed driver is found
|
|
@@ -170,6 +210,11 @@ public class RdserviceFingerprintscannerModule extends ReactContextBaseJavaModul
|
|
|
170
210
|
promise.reject("FINGERPRINT_CAPTURE__FAILED","FingerPrint Capture Failed");
|
|
171
211
|
}
|
|
172
212
|
|
|
213
|
+
@Override
|
|
214
|
+
public void onRDServiceFaceCaptureFailed(int resultCode, Intent data) {
|
|
215
|
+
promise.reject("FACE_CAPTURE__FAILED","Face Capture Failed");
|
|
216
|
+
}
|
|
217
|
+
|
|
173
218
|
private class RDServiceActivityEventListener extends BaseActivityEventListener {
|
|
174
219
|
@Override
|
|
175
220
|
public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":"","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DEFAULT_PID_OPTIONS = exports.AVAILABLE_PACKAGES = void 0;
|
|
7
|
+
exports.captureFace = captureFace;
|
|
7
8
|
exports.captureFinger = captureFinger;
|
|
8
9
|
exports.getDeviceInfo = getDeviceInfo;
|
|
9
10
|
exports.isDriverFound = isDriverFound;
|
|
@@ -118,4 +119,25 @@ function captureFinger(pidOptions = DEFAULT_PID_OPTIONS) {
|
|
|
118
119
|
});
|
|
119
120
|
});
|
|
120
121
|
}
|
|
122
|
+
function captureFace(pidOptions) {
|
|
123
|
+
return new Promise((resolve, reject) => {
|
|
124
|
+
if (!pidOptions) {
|
|
125
|
+
reject("PID Options cannot be empty");
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
RdserviceFingerprintscanner.captureFace(pidOptions).then(res => {
|
|
129
|
+
const resObj = {
|
|
130
|
+
pidDataJson: JSON.parse(res.pidDataJsonString),
|
|
131
|
+
pidDataXML: res.pidDataXML,
|
|
132
|
+
status: res.status,
|
|
133
|
+
errInfo: res.errInfo,
|
|
134
|
+
errorCode: parseInt(res.errorCode),
|
|
135
|
+
message: res.message
|
|
136
|
+
};
|
|
137
|
+
resolve(resObj);
|
|
138
|
+
}).catch(err => {
|
|
139
|
+
reject(err);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
}
|
|
121
143
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","RdserviceFingerprintscanner","NativeModules","Proxy","get","Error","AVAILABLE_PACKAGES","exports","Secugen","Morpho","Mantra","Startek_FM220","Gemalto_3M_Cogent_CSD200","Integra","Aratek","Maestros","Tatvik_TMF20","Evolute","PB510","MIS100V2_by_Mantra","NEXT_Biometrics_NB3023","IriTech_IriShield","Evolute_IRIS","DEFAULT_PID_OPTIONS","getDeviceInfo","Promise","resolve","reject","then","res","status","resObj","message","isWhitelisted","rdServiceInfoJson","JSON","parse","rdServiceInfoJsonString","rdServiceInfoXML","rdServicePackage","catch","err","isDriverFound","packageName","openFingerPrintScanner","pidOptions","pidDataJsonString","pidDataJson","pidDataXML","errInfo","errorCode","parseInt","captureFinger"],"sourceRoot":"../../src","sources":["index.js"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","RdserviceFingerprintscanner","NativeModules","Proxy","get","Error","AVAILABLE_PACKAGES","exports","Secugen","Morpho","Mantra","Startek_FM220","Gemalto_3M_Cogent_CSD200","Integra","Aratek","Maestros","Tatvik_TMF20","Evolute","PB510","MIS100V2_by_Mantra","NEXT_Biometrics_NB3023","IriTech_IriShield","Evolute_IRIS","DEFAULT_PID_OPTIONS","getDeviceInfo","Promise","resolve","reject","then","res","status","resObj","message","isWhitelisted","rdServiceInfoJson","JSON","parse","rdServiceInfoJsonString","rdServiceInfoXML","rdServicePackage","catch","err","isDriverFound","packageName","openFingerPrintScanner","pidOptions","pidDataJsonString","pidDataJson","pidDataXML","errInfo","errorCode","parseInt","captureFinger","captureFace"],"sourceRoot":"../../src","sources":["index.js"],"mappings":";;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,aAAa,GACjB,oG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AEC,GAAG,IAAK;MACdd,MAAM,CAACc,GAAG,CAAC;IACb,CAAC,CAAC;EACN,CAAC,CAAC;AACJ;AAEO,SAASY,WAAWA,CAACR,UAAU,EAAE;EACtC,OAAO,IAAIpB,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtC,IAAG,CAACkB,UAAU,EAAC;MACblB,MAAM,CAAC,6BAA6B,CAAC;MACrC;IACF;IACA1B,2BAA2B,CAACoD,WAAW,CAACR,UAAU,CAAC,CAChDjB,IAAI,CAAEC,GAAG,IAAK;MACb,MAAME,MAAM,GAAG;QACbgB,WAAW,EAAEZ,IAAI,CAACC,KAAK,CAACP,GAAG,CAACiB,iBAAiB,CAAC;QAC9CE,UAAU,EAAEnB,GAAG,CAACmB,UAAU;QAC1BlB,MAAM,EAAED,GAAG,CAACC,MAAM;QAClBmB,OAAO,EAAEpB,GAAG,CAACoB,OAAO;QACpBC,SAAS,EAAEC,QAAQ,CAACtB,GAAG,CAACqB,SAAS,CAAC;QAClClB,OAAO,EAAEH,GAAG,CAACG;MACf,CAAC;MACDN,OAAO,CAACK,MAAM,CAAC;IACjB,CAAC,CAAC,CACDS,KAAK,CAAEC,GAAG,IAAK;MACdd,MAAM,CAACc,GAAG,CAAC;IACb,CAAC,CAAC;EACN,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":"","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -108,4 +108,25 @@ export function captureFinger(pidOptions = DEFAULT_PID_OPTIONS) {
|
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
+
export function captureFace(pidOptions) {
|
|
112
|
+
return new Promise((resolve, reject) => {
|
|
113
|
+
if (!pidOptions) {
|
|
114
|
+
reject("PID Options cannot be empty");
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
RdserviceFingerprintscanner.captureFace(pidOptions).then(res => {
|
|
118
|
+
const resObj = {
|
|
119
|
+
pidDataJson: JSON.parse(res.pidDataJsonString),
|
|
120
|
+
pidDataXML: res.pidDataXML,
|
|
121
|
+
status: res.status,
|
|
122
|
+
errInfo: res.errInfo,
|
|
123
|
+
errorCode: parseInt(res.errorCode),
|
|
124
|
+
message: res.message
|
|
125
|
+
};
|
|
126
|
+
resolve(resObj);
|
|
127
|
+
}).catch(err => {
|
|
128
|
+
reject(err);
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
111
132
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","RdserviceFingerprintscanner","Proxy","get","Error","AVAILABLE_PACKAGES","Secugen","Morpho","Mantra","Startek_FM220","Gemalto_3M_Cogent_CSD200","Integra","Aratek","Maestros","Tatvik_TMF20","Evolute","PB510","MIS100V2_by_Mantra","NEXT_Biometrics_NB3023","IriTech_IriShield","Evolute_IRIS","DEFAULT_PID_OPTIONS","getDeviceInfo","Promise","resolve","reject","then","res","status","resObj","message","isWhitelisted","rdServiceInfoJson","JSON","parse","rdServiceInfoJsonString","rdServiceInfoXML","rdServicePackage","catch","err","isDriverFound","packageName","openFingerPrintScanner","pidOptions","pidDataJsonString","pidDataJson","pidDataXML","errInfo","errorCode","parseInt","captureFinger"],"sourceRoot":"../../src","sources":["index.js"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtD,MAAMC,aAAa,
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","RdserviceFingerprintscanner","Proxy","get","Error","AVAILABLE_PACKAGES","Secugen","Morpho","Mantra","Startek_FM220","Gemalto_3M_Cogent_CSD200","Integra","Aratek","Maestros","Tatvik_TMF20","Evolute","PB510","MIS100V2_by_Mantra","NEXT_Biometrics_NB3023","IriTech_IriShield","Evolute_IRIS","DEFAULT_PID_OPTIONS","getDeviceInfo","Promise","resolve","reject","then","res","status","resObj","message","isWhitelisted","rdServiceInfoJson","JSON","parse","rdServiceInfoJsonString","rdServiceInfoXML","rdServicePackage","catch","err","isDriverFound","packageName","openFingerPrintScanner","pidOptions","pidDataJsonString","pidDataJson","pidDataXML","errInfo","errorCode","parseInt","captureFinger","captureFace"],"sourceRoot":"../../src","sources":["index.js"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtD,MAAMC,aAAa,GACjB,oGAAoG,GACpGD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,2BAA2B,GAAGN,aAAa,CAACM,2BAA2B,GACzEN,aAAa,CAACM,2BAA2B,GACzC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,OAAO,MAAMQ,kBAAkB,GAAG;EAChCC,OAAO,EAAE,uBAAuB;EAChCC,MAAM,EAAE,mBAAmB;EAC3BC,MAAM,EAAE,sBAAsB;EAC9BC,aAAa,EAAE,sBAAsB;EACrCC,wBAAwB,EAAE,iCAAiC;EAC3DC,OAAO,EAAE,+BAA+B;EACxCC,MAAM,EAAE,+BAA+B;EACvCC,QAAQ,EAAE,gCAAgC;EAC1CC,YAAY,EAAE,sBAAsB;EACpCC,OAAO,EAAE,uBAAuB;EAChCC,KAAK,EAAE,+BAA+B;EACtCC,kBAAkB,EAAE,+BAA+B;EACnDC,sBAAsB,EAAE,8BAA8B;EACtDC,iBAAiB,EAAE,uBAAuB;EAC1CC,YAAY,EAAE;AAChB,CAAC;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package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
declare module "react-native-rdservice-fingerprintscanner" {
|
|
2
2
|
export type deviceInfoProps = {
|
|
3
|
-
isWhitelisted: boolean
|
|
4
|
-
rdServiceInfoJson:
|
|
5
|
-
rdServiceInfoXML: string
|
|
6
|
-
rdServicePackage: string
|
|
7
|
-
status: number
|
|
8
|
-
message: string
|
|
3
|
+
isWhitelisted: boolean;
|
|
4
|
+
rdServiceInfoJson: Record<string, any>;
|
|
5
|
+
rdServiceInfoXML: string;
|
|
6
|
+
rdServicePackage: string;
|
|
7
|
+
status: number;
|
|
8
|
+
message: string;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export type optionalInfo = {
|
|
12
|
-
status: number
|
|
13
|
-
message: string
|
|
12
|
+
status: number;
|
|
13
|
+
message: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export type fingerprintDataProps = {
|
|
17
|
-
pidDataJson:
|
|
18
|
-
pidDataXML: string
|
|
19
|
-
rdServicePackage: string
|
|
20
|
-
status: number
|
|
21
|
-
errInfo: string
|
|
22
|
-
errorCode: number
|
|
23
|
-
message: string
|
|
17
|
+
pidDataJson: Record<string, any>;
|
|
18
|
+
pidDataXML: string;
|
|
19
|
+
rdServicePackage: string;
|
|
20
|
+
status: number;
|
|
21
|
+
errInfo: string;
|
|
22
|
+
errorCode: number;
|
|
23
|
+
message: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type faceCaptureDataProps = {
|
|
27
|
+
pidDataJson: Record<string, any>;
|
|
28
|
+
pidDataXml: string;
|
|
29
|
+
status: number;
|
|
30
|
+
errInfo: string;
|
|
31
|
+
errorCode: number;
|
|
32
|
+
message: string;
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
export type driverDataProps = {
|
|
@@ -52,5 +61,6 @@ declare module "react-native-rdservice-fingerprintscanner" {
|
|
|
52
61
|
export function captureFinger(pidOptions?: string): Promise<fingerprintDataProps>;
|
|
53
62
|
export function isDriverFound(packageName: string): Promise<driverDataProps>;
|
|
54
63
|
export function openFingerPrintScanner(packageName: string, pidOptions?: string): Promise<fingerprintDataProps | driverDataProps>;
|
|
64
|
+
export function captureFace(pidOptions: string): Promise<faceCaptureDataProps>;
|
|
55
65
|
|
|
56
66
|
}
|
package/src/index.js
CHANGED
|
@@ -136,3 +136,27 @@ export function captureFinger(pidOptions = DEFAULT_PID_OPTIONS) {
|
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
+
|
|
140
|
+
export function captureFace(pidOptions) {
|
|
141
|
+
return new Promise((resolve, reject) => {
|
|
142
|
+
if(!pidOptions){
|
|
143
|
+
reject("PID Options cannot be empty")
|
|
144
|
+
return
|
|
145
|
+
}
|
|
146
|
+
RdserviceFingerprintscanner.captureFace(pidOptions)
|
|
147
|
+
.then((res) => {
|
|
148
|
+
const resObj = {
|
|
149
|
+
pidDataJson: JSON.parse(res.pidDataJsonString),
|
|
150
|
+
pidDataXML: res.pidDataXML,
|
|
151
|
+
status: res.status,
|
|
152
|
+
errInfo: res.errInfo,
|
|
153
|
+
errorCode: parseInt(res.errorCode),
|
|
154
|
+
message: res.message,
|
|
155
|
+
};
|
|
156
|
+
resolve(resObj);
|
|
157
|
+
})
|
|
158
|
+
.catch((err) => {
|
|
159
|
+
reject(err);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
-
|
|
6
|
-
Pod::Spec.new do |s|
|
|
7
|
-
s.name = "react-native-rdservice-fingerprintscanner"
|
|
8
|
-
s.version = package["version"]
|
|
9
|
-
s.summary = package["description"]
|
|
10
|
-
s.homepage = package["homepage"]
|
|
11
|
-
s.license = package["license"]
|
|
12
|
-
s.authors = package["author"]
|
|
13
|
-
|
|
14
|
-
s.platforms = { :ios => "11.0" }
|
|
15
|
-
s.source = { :git => "https://github.com/senthalan2/react-native-rdservice-fingerprintscanner.git", :tag => "#{s.version}" }
|
|
16
|
-
|
|
17
|
-
s.source_files = "ios/**/*.{h,m,mm}"
|
|
18
|
-
|
|
19
|
-
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
20
|
-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
21
|
-
if respond_to?(:install_modules_dependencies, true)
|
|
22
|
-
install_modules_dependencies(s)
|
|
23
|
-
else
|
|
24
|
-
s.dependency "React-Core"
|
|
25
|
-
|
|
26
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
28
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
-
s.pod_target_xcconfig = {
|
|
30
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
31
|
-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
32
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
33
|
-
}
|
|
34
|
-
s.dependency "React-Codegen"
|
|
35
|
-
s.dependency "RCT-Folly"
|
|
36
|
-
s.dependency "RCTRequired"
|
|
37
|
-
s.dependency "RCTTypeSafety"
|
|
38
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|