@regulaforensics/react-native-document-reader-api 8.3.199-nightly → 8.3.201-beta

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.
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
14
14
  s.source = { :http => 'file:' + __dir__ }
15
15
  s.ios.deployment_target = '13.0'
16
16
  s.source_files = "ios/*.{h,m}"
17
- s.dependency 'DocumentReaderNightly', '8.3.4951'
17
+ s.dependency 'DocumentReader', '8.2.4934'
18
18
  s.dependency 'React'
19
19
  end
@@ -32,7 +32,7 @@ android {
32
32
  rootProject.allprojects {
33
33
  repositories {
34
34
  maven {
35
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
35
+ url "https://maven.regulaforensics.com/RegulaDocumentReader"
36
36
  }
37
37
  }
38
38
  }
@@ -41,7 +41,7 @@ dependencies {
41
41
  //noinspection GradleDynamicVersion
42
42
  implementation 'com.facebook.react:react-native:+'
43
43
  //noinspection GradleDependency
44
- implementation('com.regula.documentreader:api:8.3.11699') {
44
+ implementation('com.regula.documentreader:api:8.2.11679') {
45
45
  transitive = true
46
46
  }
47
47
  }
package/example/App.tsx CHANGED
@@ -8,6 +8,10 @@ import Icon from 'react-native-vector-icons/FontAwesome'
8
8
  import { launchImageLibrary } from 'react-native-image-picker'
9
9
  import * as Progress from 'react-native-progress'
10
10
 
11
+
12
+ // Example of how to get MRZ string is on line 174
13
+ const MRZ_STRING = "PLACE YOUR MRZ STRING HERE"
14
+
11
15
  var isReadingRfid = false
12
16
 
13
17
  interface IProps {
@@ -36,6 +40,11 @@ export default class App extends React.Component<IProps, IState> {
36
40
  var functionality = new Functionality()
37
41
  functionality.showCaptureButton = true
38
42
  DocumentReader.setFunctionality(functionality, _ => { }, _ => { })
43
+
44
+ DocumentReader.setRfidScenario({
45
+ mrz: MRZ_STRING,
46
+ pacePasswordType: Enum.eRFID_Password_Type.PPT_MRZ,
47
+ }, _ => { }, _ => { })
39
48
  }
40
49
 
41
50
  constructor(props: {} | Readonly<{}>) {
@@ -154,40 +163,18 @@ export default class App extends React.Component<IProps, IState> {
154
163
  DocumentReader.startScanner(config, _ => { }, e => console.log(e))
155
164
  }
156
165
 
157
- recognize() {
158
- launchImageLibrary({
159
- mediaType: 'photo',
160
- includeBase64: true,
161
- selectionLimit: 10
162
- }, r => {
163
- if (r.errorCode != null) {
164
- console.log("error code: " + r.errorCode)
165
- console.log("error message: " + r.errorMessage)
166
- this.setState({ fullName: r.errorMessage })
167
- return
168
- }
169
- if (r.didCancel) return
170
- this.clearResults()
171
- this.setState({ fullName: "COPYING IMAGE..." })
172
- var response = r.assets
173
-
174
- var images: any = []
175
-
176
- for (var i = 0; i < response!.length; i++) {
177
- images.push(response![i].base64!)
178
- }
179
- this.setState({ fullName: "PROCESSING..." })
180
-
181
- var config = new RecognizeConfig()
182
- config.scenario = this.state.selectedScenario
183
- config.images = images
184
- DocumentReader.recognize(config, _ => { }, e => console.log(e))
185
- })
166
+ nfcOnly() {
167
+ DocumentReader.startRFIDReader(false, false, false, _ => { }, _ => { });
186
168
  }
187
169
 
188
170
  displayResults(results: DocumentReaderResults) {
189
171
  if (results == null) return
190
172
 
173
+ // Here is how you can aquire the MRZ string
174
+ // results.textFieldValueByType(Enum.eVisualFieldType.FT_MRZ_STRINGS, (value: string | undefined) => {
175
+ // console.log("MRZ: " + value)
176
+ // }, _ => { })
177
+
191
178
  results.textFieldValueByType(Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, (value: string | undefined) => {
192
179
  this.setState({ fullName: value })
193
180
  }, (error: string) => console.log(error))
@@ -269,7 +256,7 @@ export default class App extends React.Component<IProps, IState> {
269
256
  <View style={{ flexDirection: 'row' }}>
270
257
  <Button color="#4285F4" title="Scan document" onPress={() => this.scan()} />
271
258
  <Text style={{ padding: 5 }}></Text>
272
- <Button color="#4285F4" title="Scan image" onPress={() => this.recognize()} />
259
+ <Button color="#4285F4" title="Scan image" onPress={() => this.nfcOnly()} />
273
260
  </View>
274
261
  </View>}
275
262
 
@@ -10,8 +10,8 @@
10
10
  "test": "jest"
11
11
  },
12
12
  "dependencies": {
13
- "@regulaforensics/react-native-document-reader-api": "8.3.199-nightly",
14
- "@regulaforensics/react-native-document-reader-core-fullauthrfid": "8.3.604-nightly",
13
+ "@regulaforensics/react-native-document-reader-api": "8.3.201-beta",
14
+ "@regulaforensics/react-native-document-reader-core-fullauthrfid": "8.2.586",
15
15
  "react-native-progress": "5.0.0",
16
16
  "react-native-radio-buttons-group": "3.0.5",
17
17
  "@rneui/base": "4.0.0-rc.7",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/react-native-document-reader-api",
3
- "version": "8.3.199-nightly",
3
+ "version": "8.3.201-beta",
4
4
  "description": "React Native module for reading and validation of identification documents (API framework)",
5
5
  "main": "index.js",
6
6
  "scripts": {