scandit-react-native-datacapture-parser 6.10.0 → 6.11.0-beta.3
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/android/build.gradle
CHANGED
|
@@ -7,23 +7,16 @@ buildscript {
|
|
|
7
7
|
mavenCentral()
|
|
8
8
|
}
|
|
9
9
|
dependencies {
|
|
10
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.
|
|
10
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
apply plugin: 'com.android.library'
|
|
15
15
|
apply plugin: 'kotlin-android'
|
|
16
|
-
apply plugin: 'maven'
|
|
17
16
|
|
|
18
17
|
android {
|
|
19
18
|
compileSdkVersion safeExtGet('compileSdkVersion', 29)
|
|
20
19
|
|
|
21
|
-
sourceSets {
|
|
22
|
-
main.java.srcDirs += 'src/main/kotlin'
|
|
23
|
-
test.java.srcDirs += 'src/test/kotlin'
|
|
24
|
-
androidTest.java.srcDirs += 'src/androidTest/kotlin'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
20
|
defaultConfig {
|
|
28
21
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
29
22
|
targetSdkVersion safeExtGet('targetSdkVersion', 29)
|
|
@@ -37,12 +30,11 @@ android {
|
|
|
37
30
|
}
|
|
38
31
|
|
|
39
32
|
dependencies {
|
|
40
|
-
def sdk_version = "6.
|
|
33
|
+
def sdk_version = "6.11.0-beta.3"
|
|
41
34
|
|
|
42
35
|
api project(path: ':scandit-react-native-datacapture-core')
|
|
43
36
|
api "com.scandit.datacapture:parser:$sdk_version"
|
|
44
37
|
|
|
45
38
|
//noinspection GradleDynamicVersion
|
|
46
39
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
47
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10"
|
|
48
40
|
}
|
|
@@ -24,23 +24,23 @@ class ScanditDataCaptureParserModule(
|
|
|
24
24
|
private val reactContext: ReactApplicationContext,
|
|
25
25
|
private val parserDeserializer: ParserDeserializer = ParserDeserializer()
|
|
26
26
|
) : ReactContextBaseJavaModule(reactContext),
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
ParserDeserializerListener,
|
|
28
|
+
TreeLifecycleObserver.Callbacks {
|
|
29
29
|
companion object {
|
|
30
30
|
private const val DEFAULTS_KEY = "Defaults"
|
|
31
31
|
|
|
32
32
|
private val ERROR_INVALID_PARSER_ID =
|
|
33
|
-
|
|
33
|
+
Error(1, "The parser id does not match the current parser id.")
|
|
34
34
|
private val ERROR_PARSER_FAILURE =
|
|
35
|
-
|
|
35
|
+
Error(2, "Parser error: %s")
|
|
36
36
|
private val ERROR_INVALID_BASE_64 =
|
|
37
|
-
|
|
37
|
+
Error(3, "Invalid Base64.")
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
override fun getName(): String = "ScanditDataCaptureParser"
|
|
41
41
|
|
|
42
42
|
override fun getConstants(): MutableMap<String, Any> = mutableMapOf(
|
|
43
|
-
|
|
43
|
+
DEFAULTS_KEY to Arguments.createMap()
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
@VisibleForTesting
|
|
@@ -92,6 +92,7 @@ class ScanditDataCaptureParserModule(
|
|
|
92
92
|
val base64Bytes = try {
|
|
93
93
|
Base64.decode(data, 0)
|
|
94
94
|
} catch (e: IllegalArgumentException) {
|
|
95
|
+
println(e)
|
|
95
96
|
promise.reject(ERROR_INVALID_BASE_64)
|
|
96
97
|
|
|
97
98
|
return
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scandit-react-native-datacapture-parser",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.11.0-beta.3",
|
|
4
4
|
"description": "Scandit Data Capture SDK for React Native",
|
|
5
5
|
"homepage": "https://github.com/Scandit/scandit-react-native-datacapture-parser",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"react": "
|
|
24
|
+
"react": ">=16.8.1",
|
|
25
25
|
"react-native": ">=0.60.0-rc.0 <1.0.x"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"typescript": "^3.8.3"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"scandit-react-native-datacapture-core": "6.
|
|
32
|
+
"scandit-react-native-datacapture-core": "6.11.0-beta.3"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.requires_arc = true
|
|
17
17
|
s.module_name = "ScanditDataCaptureParser"
|
|
18
18
|
s.header_dir = "ScanditDataCaptureParser"
|
|
19
|
-
s.dependency 'ScanditParser', '= 6.
|
|
19
|
+
s.dependency 'ScanditParser', '= 6.11.0-beta.3'
|
|
20
20
|
|
|
21
21
|
s.dependency "React"
|
|
22
22
|
s.dependency "scandit-react-native-datacapture-core"
|