dynamsoft-capture-vision-react-native 2.6.1016 → 3.0.5100
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/LICENSE +2 -2
- package/README.md +7 -9
- package/android/build.gradle +73 -42
- package/android/src/main/cpp/CMakeLists.txt +22 -0
- package/android/src/main/cpp/ImgHO.cpp +95 -0
- package/android/src/main/cpp/ImgHO.h +34 -0
- package/android/src/main/cpp/JsiCore.cpp +284 -0
- package/android/src/main/cpp/JsiCore.h +51 -0
- package/android/src/main/cpp/JsiCvr.cpp +327 -0
- package/android/src/main/cpp/JsiCvr.h +54 -0
- package/android/src/main/cpp/JsiDbr.cpp +38 -0
- package/android/src/main/cpp/JsiDbr.h +26 -0
- package/android/src/main/cpp/JsiDce.cpp +59 -0
- package/android/src/main/cpp/JsiDce.h +17 -0
- package/android/src/main/cpp/JsiDcp.cpp +51 -0
- package/android/src/main/cpp/JsiDcp.h +31 -0
- package/android/src/main/cpp/JsiDdn.cpp +50 -0
- package/android/src/main/cpp/JsiDdn.h +28 -0
- package/android/src/main/cpp/JsiDlr.cpp +51 -0
- package/android/src/main/cpp/JsiDlr.h +26 -0
- package/android/src/main/cpp/JsiUtility.cpp +196 -0
- package/android/src/main/cpp/JsiUtility.h +16 -0
- package/android/src/main/cpp/RawBuffer.cpp +24 -0
- package/android/src/main/cpp/RawBuffer.h +24 -0
- package/android/src/main/cpp/android_log.h +14 -0
- package/android/src/main/dysJniLibs/debug/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/debug/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/debug/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/debug/x86_64/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/release/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/release/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/release/x86/librn_dys.so +0 -0
- package/android/src/main/dysJniLibs/release/x86_64/librn_dys.so +0 -0
- package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/CVRModule.kt +4 -4
- package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/DCEModule.kt +10 -0
- package/android/src/main/java/com/dynamsoft/reactnativelib/ReactNativeDcvPackage.kt +13 -85
- package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/VersionsModule.kt +2 -2
- package/android/src/main/java/com/dynamsoft/reactnativelib/cvr/CaptureVisionRouterModuleImpl.kt +25 -25
- package/android/src/main/java/com/dynamsoft/reactnativelib/dce/CameraEnhancerModuleImpl.kt +23 -2
- package/android/src/main/java/com/dynamsoft/reactnativelib/license/LicenseModuleImpl.kt +1 -1
- package/android/src/main/java/com/dynamsoft/reactnativelib/utility/ImageManagerModuleImpl.kt +19 -4
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForCore.kt +14 -0
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForCvr.kt +12 -7
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForDBR.kt +1 -7
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForDCE.kt +2 -2
- package/android/src/main/java/com/dynamsoft/reactnativelib/utils/ForDDN.kt +27 -19
- package/dynamsoft-capture-vision-react-native.podspec +9 -7
- package/ios/CPP/DSImageData+HostObject.h +1 -1
- package/ios/CPP/RNDynamsoft+JSI.h +2 -2
- package/ios/CPP/RNDynamsoft+JSI.mm +18 -10
- package/ios/CPP/RNDynamsoft+Json.h +2 -13
- package/ios/CPP/RNDynamsoft+Json.m +48 -39
- package/ios/CPP/YeetJSIUtils.h +3 -1
- package/ios/CPP/YeetJSIUtils.mm +5 -0
- package/ios/RNDynamsoftCameraView.m +1 -1
- package/ios/RNDynamsoftCameraViewManager.m +23 -8
- package/ios/RNDynamsoftCaptureVisionRouter.mm +76 -45
- package/ios/RNDynamsoftImageEditorView.m +1 -1
- package/ios/RNDynamsoftImageEditorViewManager.mm +36 -13
- package/ios/RNDynamsoftImageManager.mm +33 -4
- package/ios/RNDynamsoftImageSourceAdapter.mm +1 -1
- package/ios/RNDynamsoftLicense.m +1 -1
- package/ios/RNDynamsoftMultiCrossFilter.m +9 -9
- package/ios/RNDynamsoftVersions.m +1 -13
- package/package.json +3 -11
- package/src/core/CapturedResultBase.tsx +18 -0
- package/src/core/EnumCaptureResultItemType.tsx +12 -6
- package/src/core/EnumCrossVerificationStatus.tsx +6 -6
- package/src/core/ImageData.tsx +1 -1
- package/src/core/index.tsx +1 -0
- package/src/cvr/CaptureVisionRouter.tsx +47 -51
- package/src/cvr/CapturedResult.tsx +24 -46
- package/src/cvr/CapturedResultReceiver.tsx +12 -19
- package/src/cvr/NativeDynamsoftCaptureVisionRouterModule.tsx +2 -2
- package/src/cvr/SimplifiedCaptureVisionSettings.tsx +4 -4
- package/src/dbr/DecodedBarcodesResult.tsx +3 -17
- package/src/dce/CameraEnhancer.tsx +9 -0
- package/src/dce/DynamsoftCameraViewNativeComponent.ts +2 -2
- package/src/dce/EnumResolution.tsx +7 -0
- package/src/dce/NativeDynamsoftCameraViewModule.tsx +4 -0
- package/src/dce/index.tsx +1 -0
- package/src/dcp/ParsedResult.tsx +3 -14
- package/src/ddn/DeskewedImageResultItem.tsx +40 -0
- package/src/ddn/DetectedQuadResultItem.tsx +3 -1
- package/src/ddn/EnhancedImageResultItem.tsx +20 -0
- package/src/ddn/ProcessedDocumentResult.tsx +27 -0
- package/src/ddn/SimplifiedDocumentNormalizerSettings.tsx +18 -3
- package/src/ddn/index.tsx +3 -3
- package/src/dlr/RecognizedTextLinesResult.tsx +2 -16
- package/src/index.tsx +0 -1
- package/src/utility/ImageManager.tsx +66 -45
- package/android/src/main/java/com/dynamsoft/reactnativelib/rtu/BarcodeScannerModuleImpl.kt +0 -80
- package/android/src/main/java/com/dynamsoft/reactnativelib/rtu/MRZScannerModuleImpl.kt +0 -77
- package/android/src/main/java/com/dynamsoft/reactnativelib/rtu/ScannerInterface.kt +0 -47
- package/android/src/main/jniLibs/arm64-v8a/librn_dys.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/librn_dys.so +0 -0
- package/android/src/main/jniLibs/x86/librn_dys.so +0 -0
- package/android/src/main/jniLibs/x86_64/librn_dys.so +0 -0
- package/android/src/newarch/com/dynamsoft/reactnativelib/BarcodeScannerModule.kt +0 -22
- package/android/src/newarch/com/dynamsoft/reactnativelib/CVRModule.kt +0 -91
- package/android/src/newarch/com/dynamsoft/reactnativelib/CameraViewManager.kt +0 -52
- package/android/src/newarch/com/dynamsoft/reactnativelib/DCEModule.kt +0 -91
- package/android/src/newarch/com/dynamsoft/reactnativelib/ISAModule.kt +0 -60
- package/android/src/newarch/com/dynamsoft/reactnativelib/ImageEditorViewManager.kt +0 -16
- package/android/src/newarch/com/dynamsoft/reactnativelib/ImageEditorViewModule.kt +0 -24
- package/android/src/newarch/com/dynamsoft/reactnativelib/ImageManagerModule.kt +0 -12
- package/android/src/newarch/com/dynamsoft/reactnativelib/LicenseModule.kt +0 -14
- package/android/src/newarch/com/dynamsoft/reactnativelib/MRZScannerModule.kt +0 -22
- package/android/src/newarch/com/dynamsoft/reactnativelib/MultiCrossFilterModule.kt +0 -58
- package/android/src/newarch/com/dynamsoft/reactnativelib/VersionsModule.kt +0 -41
- package/android/src/oldarch/com/dynamsoft/reactnativelib/BarcodeScannerModule.kt +0 -24
- package/android/src/oldarch/com/dynamsoft/reactnativelib/MRZScannerModule.kt +0 -24
- package/ios/RNDynamsoftBarcodeScanner.h +0 -14
- package/ios/RNDynamsoftBarcodeScanner.m +0 -169
- package/ios/RNDynamsoftMRZScanner.h +0 -14
- package/ios/RNDynamsoftMRZScanner.m +0 -140
- package/src/ddn/DetectedQuadsResult.tsx +0 -31
- package/src/ddn/NormalizedImageResultItem.tsx +0 -32
- package/src/ddn/NormalizedImagesResult.tsx +0 -27
- package/src/rtu/BarcodeScanConfig.tsx +0 -104
- package/src/rtu/BarcodeScanResult.tsx +0 -31
- package/src/rtu/BarcodeScanner.tsx +0 -112
- package/src/rtu/EnumResultState.tsx +0 -21
- package/src/rtu/MRZScanConfig.tsx +0 -67
- package/src/rtu/MRZScanResult.tsx +0 -84
- package/src/rtu/MRZScanner.tsx +0 -90
- package/src/rtu/NativeDynamsoftBarcodeScannerModule.tsx +0 -6
- package/src/rtu/NativeDynamsoftMRZScannerModule.tsx +0 -6
- package/src/rtu/index.tsx +0 -7
- /package/android/src/main/{withNamespace/AndroidManifest.xml → AndroidManifest.xml} +0 -0
- /package/android/src/main/{withoutNamespace/AndroidManifest.xml → AndroidManifest_noPackage.xml} +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/CameraViewManager.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/ISAModule.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/ImageEditorViewManager.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/ImageEditorViewModule.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/ImageManagerModule.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/LicenseModule.kt +0 -0
- /package/android/src/{oldarch → main/java}/com/dynamsoft/reactnativelib/MultiCrossFilterModule.kt +0 -0
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib.rtu
|
|
2
|
-
|
|
3
|
-
import android.app.Activity
|
|
4
|
-
import android.content.Intent
|
|
5
|
-
import com.dynamsoft.mrzscannerbundle.ui.EnumDocumentType
|
|
6
|
-
import com.dynamsoft.mrzscannerbundle.ui.MRZData
|
|
7
|
-
import com.dynamsoft.mrzscannerbundle.ui.MRZScanResult
|
|
8
|
-
import com.dynamsoft.mrzscannerbundle.ui.MRZScannerActivity
|
|
9
|
-
import com.dynamsoft.mrzscannerbundle.ui.MRZScannerConfig
|
|
10
|
-
import com.facebook.react.bridge.Arguments
|
|
11
|
-
import com.facebook.react.bridge.Promise
|
|
12
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
13
|
-
import com.facebook.react.bridge.ReadableMap
|
|
14
|
-
import com.facebook.react.bridge.WritableMap
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class MRZScannerModuleImpl(private val reactContext: ReactApplicationContext): ScannerModule(reactContext) {
|
|
18
|
-
companion object {
|
|
19
|
-
const val NAME = "DynamsoftMRZScannerModule"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
fun startMRZScanner(config: ReadableMap, promise: Promise) {
|
|
23
|
-
super.startScanner(config, promise)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
fun closeMRZScanner(promise: Promise) {
|
|
27
|
-
super.closeScanner(promise)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
override fun createIntent(config: ReadableMap) =
|
|
31
|
-
MRZScannerActivity.ResultContract().createIntent(reactContext, config.toMRZScannerConfig())
|
|
32
|
-
|
|
33
|
-
override fun getPromiseResolve(intent: Intent) = MRZScanResult(Activity.RESULT_OK, intent).toWritableMap()
|
|
34
|
-
|
|
35
|
-
private fun ReadableMap.toMRZScannerConfig() = MRZScannerConfig().also {
|
|
36
|
-
it.license = getString("license")
|
|
37
|
-
if (hasKey("isTorchButtonVisible")) {
|
|
38
|
-
it.isTorchButtonVisible = getBoolean("isTorchButtonVisible")
|
|
39
|
-
}
|
|
40
|
-
if (hasKey("isBeepEnabled")) {
|
|
41
|
-
it.isBeepEnabled = getBoolean("isBeepEnabled")
|
|
42
|
-
}
|
|
43
|
-
if (hasKey("isCloseButtonVisible")) {
|
|
44
|
-
it.isCloseButtonVisible = getBoolean("isCloseButtonVisible")
|
|
45
|
-
}
|
|
46
|
-
if (hasKey("isGuideFrameVisible")) {
|
|
47
|
-
it.isGuideFrameVisible = getBoolean("isGuideFrameVisible")
|
|
48
|
-
}
|
|
49
|
-
if (hasKey("documentType")) {
|
|
50
|
-
it.documentType = EnumDocumentType.values()[getInt("documentType")]
|
|
51
|
-
}
|
|
52
|
-
if(hasKey("templateFile")) {
|
|
53
|
-
it.templateFile = getString("templateFile")
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
private fun MRZScanResult.toWritableMap(): WritableMap = Arguments.createMap().apply {
|
|
58
|
-
putInt("resultStatus", resultStatus)
|
|
59
|
-
putInt("errorCode", errorCode)
|
|
60
|
-
putString("errorString", errorString)
|
|
61
|
-
putMap("data", data.toWritableMap())
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
private fun MRZData.toWritableMap() = Arguments.createMap().apply {
|
|
65
|
-
putString("documentType", documentType)
|
|
66
|
-
putString("firstName", firstName)
|
|
67
|
-
putString("lastName", lastName)
|
|
68
|
-
putString("sex", sex)
|
|
69
|
-
putString("issuingState", issuingState)
|
|
70
|
-
putString("nationality", nationality)
|
|
71
|
-
putString("dateOfBirth", dateOfBirth)
|
|
72
|
-
putString("dateOfExpire", dateOfExpire)
|
|
73
|
-
putString("documentNumber", documentNumber)
|
|
74
|
-
putInt("age", age)
|
|
75
|
-
putString("mrzText", mrzText)
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib.rtu
|
|
2
|
-
|
|
3
|
-
import android.app.Activity
|
|
4
|
-
import android.content.Intent
|
|
5
|
-
import com.facebook.react.bridge.ActivityEventListener
|
|
6
|
-
import com.facebook.react.bridge.Promise
|
|
7
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
8
|
-
import com.facebook.react.bridge.ReadableMap
|
|
9
|
-
import com.facebook.react.bridge.WritableMap
|
|
10
|
-
|
|
11
|
-
abstract class ScannerModule(private val reactContext: ReactApplicationContext): ActivityEventListener {
|
|
12
|
-
|
|
13
|
-
private var promises: HashMap<Int, Promise> = hashMapOf()
|
|
14
|
-
|
|
15
|
-
abstract fun createIntent(config: ReadableMap): Intent
|
|
16
|
-
|
|
17
|
-
abstract fun getPromiseResolve(intent: Intent): WritableMap
|
|
18
|
-
|
|
19
|
-
override fun onActivityResult(activity: Activity?, requestCode: Int, resultCode: Int, intent: Intent?) {
|
|
20
|
-
if(resultCode != Activity.RESULT_OK || intent == null) {
|
|
21
|
-
promises.remove(requestCode)?.resolve(null)
|
|
22
|
-
return
|
|
23
|
-
} else {
|
|
24
|
-
promises.remove(requestCode)?.apply {
|
|
25
|
-
resolve(getPromiseResolve(intent))
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
override fun onNewIntent(intent: Intent?) {
|
|
31
|
-
//No-op
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
fun startScanner(config: ReadableMap, promise: Promise) {
|
|
35
|
-
reactContext.addActivityEventListener(this)
|
|
36
|
-
promises[promise.hashCode()] = promise
|
|
37
|
-
reactContext.currentActivity?.startActivityForResult(
|
|
38
|
-
createIntent(config),
|
|
39
|
-
promise.hashCode()
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
fun closeScanner(promise: Promise) {
|
|
44
|
-
promise.resolve(null)
|
|
45
|
-
reactContext.removeActivityEventListener(this)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.rtu.BarcodeScannerModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
7
|
-
import com.facebook.react.bridge.ReactMethod
|
|
8
|
-
import com.facebook.react.bridge.ReadableMap
|
|
9
|
-
|
|
10
|
-
class BarcodeScannerModule(reactApplicationContext: ReactApplicationContext) : NativeDynamsoftBarcodeScannerModuleSpec(reactApplicationContext) {
|
|
11
|
-
override fun getName() = BarcodeScannerModuleImpl.NAME
|
|
12
|
-
|
|
13
|
-
val impl by lazy { BarcodeScannerModuleImpl(reactApplicationContext) }
|
|
14
|
-
|
|
15
|
-
override fun startBarcodeScanner(config: ReadableMap, promise: Promise) {
|
|
16
|
-
impl.startBarcodeScanner(config, promise)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
override fun closeBarcodeScanner(promise: Promise) {
|
|
20
|
-
impl.closeBarcodeScanner(promise)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.cvr.CaptureVisionRouterModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Arguments
|
|
5
|
-
import com.facebook.react.bridge.Promise
|
|
6
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
7
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
8
|
-
import com.facebook.react.bridge.ReadableMap
|
|
9
|
-
|
|
10
|
-
class CVRModule(reactApplicationContext: ReactApplicationContext) : NativeDynamsoftCaptureVisionRouterModuleSpec(reactApplicationContext) {
|
|
11
|
-
val impl = CaptureVisionRouterModuleImpl(reactApplicationContext)
|
|
12
|
-
|
|
13
|
-
override fun getName(): String = impl.getName()
|
|
14
|
-
override fun install(): Boolean {
|
|
15
|
-
return impl.install()
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
override fun startCapturing(template: String, promise: Promise) {
|
|
19
|
-
impl.startCapturing(template, promise)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
override fun stopCapturing(promise: Promise) {
|
|
23
|
-
impl.stopCapturing(promise)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
override fun setInput(isaId: String) {
|
|
27
|
-
impl.setInput(isaId)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
override fun continueCRR() {
|
|
31
|
-
impl.continueCRR()
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
override fun removeAllResultListeners() {
|
|
36
|
-
impl.removeAllResultListeners()
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
override fun addFilter(filterId: String) {
|
|
40
|
-
impl.addFilter(filterId)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
override fun removeFilter(filterId: String) {
|
|
44
|
-
impl.removeFilter(filterId)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
override fun resetSettings(promise: Promise) {
|
|
48
|
-
impl.resetSettings(promise)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
override fun getSimplifiedSettings(templateName: String, promise: Promise) {
|
|
52
|
-
impl.getSimplifiedSettings(templateName, promise)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
override fun updateSettings(settings: ReadableMap, templateName: String, promise: Promise) {
|
|
56
|
-
impl.updateSettings(settings, templateName, promise)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
override fun initSettings(content: String, promise: Promise) {
|
|
60
|
-
impl.initSettings(content, promise)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
override fun initSettingsFromFile(file: String, promise: Promise) {
|
|
64
|
-
impl.initSettingsFromFile(file, promise)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
override fun outputSettings(templateName: String, promise: Promise) {
|
|
68
|
-
impl.outputSettings(templateName, promise)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
override fun outputSettingsToFile(file: String, templateName: String, promise: Promise) {
|
|
72
|
-
impl.outputSettingsToFile(file, templateName, promise)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
override fun addListener(type: String) {
|
|
76
|
-
impl.addListener(type)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
override fun removeListeners(count: Double) {
|
|
80
|
-
impl.removeListeners(count.toInt())
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
override fun addResultReceiver(type: String?) {
|
|
84
|
-
//This is for IOS
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
override fun removeResultReceiver(type: String?) {
|
|
88
|
-
impl.removeListener(type)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.dce.CameraView
|
|
4
|
-
import com.dynamsoft.reactnative.dce.CameraViewManagerImpl
|
|
5
|
-
import com.facebook.react.bridge.ReadableArray
|
|
6
|
-
import com.facebook.react.bridge.ReadableMap
|
|
7
|
-
import com.facebook.react.uimanager.SimpleViewManager
|
|
8
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
9
|
-
import com.facebook.react.uimanager.annotations.ReactProp
|
|
10
|
-
import com.facebook.react.viewmanagers.DynamsoftCameraViewManagerInterface
|
|
11
|
-
|
|
12
|
-
class CameraViewManager : SimpleViewManager<CameraView>(),
|
|
13
|
-
DynamsoftCameraViewManagerInterface<CameraView> {
|
|
14
|
-
private val impl = CameraViewManagerImpl()
|
|
15
|
-
override fun createViewInstance(context: ThemedReactContext): CameraView {
|
|
16
|
-
return impl.createViewInstance(context)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
override fun getName(): String {
|
|
20
|
-
return impl.getName()
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@ReactProp(name = "VisibleLayerIds")
|
|
24
|
-
override fun setVisibleLayerIds(view: CameraView?, value: ReadableArray?) {
|
|
25
|
-
if (value != null) {
|
|
26
|
-
view?.let { impl.setVisibleLayerIds(it, value) }
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@ReactProp(name = "scanRegionMaskVisible")
|
|
31
|
-
override fun setScanRegionMaskVisible(view: CameraView?, value: Boolean) {
|
|
32
|
-
view?.let { impl.setScanRegionMaskVisible(it, value) }
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@ReactProp(name = "scanLaserVisible")
|
|
36
|
-
override fun setScanLaserVisible(view: CameraView?, value: Boolean) {
|
|
37
|
-
view?.let { impl.setScanLaserVisible(it, value) }
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@ReactProp(name = "torchButton")
|
|
41
|
-
override fun setTorchButton(view: CameraView?, value: ReadableMap?) {
|
|
42
|
-
if (value != null) {
|
|
43
|
-
view?.let { impl.setTorchButton(it, value) }
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@ReactProp(name = "torchButtonVisible")
|
|
48
|
-
override fun setTorchButtonVisible(view: CameraView?, value: Boolean) {
|
|
49
|
-
view?.let { impl.setTorchButtonVisible(it, value) }
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.dce.CameraEnhancerModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
7
|
-
import com.facebook.react.bridge.ReadableMap
|
|
8
|
-
import com.facebook.react.bridge.WritableMap
|
|
9
|
-
|
|
10
|
-
class DCEModule(reactApplicationContext: ReactApplicationContext) : NativeDynamsoftCameraViewModuleSpec(reactApplicationContext) {
|
|
11
|
-
val impl = CameraEnhancerModuleImpl(reactApplicationContext)
|
|
12
|
-
|
|
13
|
-
override fun getName(): String = impl.getName()
|
|
14
|
-
override fun createInstance(): String {
|
|
15
|
-
return impl.createInstance()
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
override fun requestCameraPermission() {
|
|
19
|
-
impl.requestCameraPermission()
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
override fun open() {
|
|
23
|
-
impl.open()
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
override fun close() {
|
|
27
|
-
impl.close()
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
override fun setCameraView(viewId: Double) {
|
|
31
|
-
impl.setCameraView(viewId.toInt())
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
override fun selectCamera(position: Double) {
|
|
35
|
-
impl.selectCamera(position.toInt())
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
override fun getCameraPosition(promise: Promise) {
|
|
39
|
-
impl.getCameraPosition(promise)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
override fun setFocus(floatX: Double, floatY: Double, focusMode: Double) {
|
|
43
|
-
impl.setFocus(floatX.toFloat(), floatY.toFloat(), focusMode.toInt())
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
override fun getFocusMode(promise: Promise) {
|
|
48
|
-
impl.getFocusMode(promise)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
override fun setZoomFactor(factor: Double) {
|
|
52
|
-
impl.setZoomFactor(factor.toFloat())
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
override fun getZoomFactor(promise: Promise) {
|
|
56
|
-
impl.getZoomFactor(promise)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
override fun enableEnhancedFeatures(features: Double) {
|
|
60
|
-
impl.enableEnhancedFeatures(features.toInt())
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
override fun disableEnhancedFeatures(features: Double) {
|
|
64
|
-
impl.disableEnhancedFeatures(features.toInt())
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
override fun setScanRegion(region: ReadableMap?) {
|
|
68
|
-
impl.setScanRegion(region)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
override fun getScanRegion(promise: Promise) {
|
|
72
|
-
impl.getScanRegion(promise)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
override fun turnOnTorch() {
|
|
76
|
-
impl.turnOnTorch()
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
override fun turnOffTorch() {
|
|
80
|
-
impl.turnOffTorch()
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
override fun beep() {
|
|
84
|
-
impl.beep()
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
override fun vibrate() {
|
|
88
|
-
impl.vibrate()
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.core.ImageSourceAdapterModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
7
|
-
|
|
8
|
-
class ISAModule(reactApplicationContext: ReactApplicationContext) : NativeDynamsoftImageSourceAdapterModuleSpec(reactApplicationContext) {
|
|
9
|
-
val impl = ImageSourceAdapterModuleImpl(reactApplicationContext)
|
|
10
|
-
|
|
11
|
-
override fun getName(): String = impl.getName()
|
|
12
|
-
override fun install(): Boolean {
|
|
13
|
-
return impl.install()
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
override fun createDefaultNativeISA(): String {
|
|
17
|
-
return impl.createDefaultNativeISA()
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
override fun destroy(isaId: String) {
|
|
21
|
-
impl.destroy(isaId)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
override fun getImageCount(isaId: String, promise: Promise) {
|
|
25
|
-
impl.getImageCount(isaId, promise)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
override fun isBufferEmpty(isaId: String, promise: Promise) {
|
|
29
|
-
impl.isBufferEmpty(isaId, promise)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
override fun clearBuffer(isaId: String, promise: Promise) {
|
|
33
|
-
impl.clearBuffer(isaId)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
override fun getColourChannelUsageType(isaId: String, promise: Promise) {
|
|
37
|
-
impl.getColourChannelUsageType(isaId, promise)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
override fun setColourChannelUsageType(isaId: String, type: Double, promise: Promise) {
|
|
41
|
-
impl.setColourChannelUsageType(isaId, type.toInt())
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
override fun getMaximumImageCount(isaId: String, promise: Promise) {
|
|
45
|
-
impl.getMaximumImageCount(isaId, promise)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
override fun setMaximumImageCount(isaId: String, maxCount: Double, promise: Promise) {
|
|
49
|
-
impl.setMaximumImageCount(isaId, maxCount.toInt())
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
override fun startFetching(isaId: String) {
|
|
53
|
-
impl.startFetching(isaId)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
override fun stopFetching(isaId: String) {
|
|
57
|
-
impl.stopFetching(isaId)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.dce.ImageEditorView
|
|
4
|
-
import com.facebook.react.module.annotations.ReactModule
|
|
5
|
-
import com.facebook.react.uimanager.SimpleViewManager
|
|
6
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
7
|
-
import com.dynamsoft.reactnative.dce.ImageEditorViewManagerImpl
|
|
8
|
-
import com.facebook.react.viewmanagers.DynamsoftImageEditorViewManagerInterface
|
|
9
|
-
|
|
10
|
-
class ImageEditorViewManager :SimpleViewManager<ImageEditorView>(), DynamsoftImageEditorViewManagerInterface<ImageEditorView> {
|
|
11
|
-
private val impl = ImageEditorViewManagerImpl()
|
|
12
|
-
override fun getName() = impl.getName()
|
|
13
|
-
override fun createViewInstance(context: ThemedReactContext): ImageEditorView {
|
|
14
|
-
return impl.createViewInstance(context)
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.dce.ImageEditorViewModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Arguments
|
|
5
|
-
import com.facebook.react.bridge.Promise
|
|
6
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
7
|
-
import com.facebook.react.bridge.ReadableArray
|
|
8
|
-
|
|
9
|
-
class ImageEditorViewModule(reactContext: ReactApplicationContext) : NativeDynamsoftImageEditorViewModuleSpec(reactContext) {
|
|
10
|
-
val impl = ImageEditorViewModuleImpl(reactContext)
|
|
11
|
-
|
|
12
|
-
override fun install(): Boolean {
|
|
13
|
-
return impl.install()
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
override fun setQuads(viewTag: Double, quads: ReadableArray?, layerId: Double, promise: Promise) {
|
|
17
|
-
impl.setQuads(viewTag.toInt(), quads?: Arguments.createArray(), layerId.toInt(), promise)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
override fun getSelectedQuad(viewTag: Double, promise: Promise) {
|
|
22
|
-
impl.getSelectedQuad(viewTag.toInt(), promise)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.utility.ImageManagerModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
|
-
|
|
6
|
-
class ImageManagerModule(reactContext: ReactApplicationContext) : NativeDynamsoftImageManagerModuleSpec(reactContext) {
|
|
7
|
-
val impl = ImageManagerModuleImpl(reactContext)
|
|
8
|
-
|
|
9
|
-
override fun install(): Boolean {
|
|
10
|
-
return impl.install()
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.license.LicenseModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
|
|
7
|
-
class LicenseModule(reactApplicationContext: ReactApplicationContext) : NativeDynamsoftLicenseModuleSpec(reactApplicationContext) {
|
|
8
|
-
val impl = LicenseModuleImpl(reactApplicationContext)
|
|
9
|
-
|
|
10
|
-
override fun getName(): String = impl.getName()
|
|
11
|
-
override fun initLicense(license: String, promise: Promise) {
|
|
12
|
-
impl.initLicense(license, promise)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.rtu.MRZScannerModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
7
|
-
import com.facebook.react.bridge.ReactMethod
|
|
8
|
-
import com.facebook.react.bridge.ReadableMap
|
|
9
|
-
|
|
10
|
-
class MRZScannerModule(reactApplicationContext: ReactApplicationContext) : NativeDynamsoftMRZScannerModuleSpec(reactApplicationContext) {
|
|
11
|
-
override fun getName() = MRZScannerModuleImpl.NAME
|
|
12
|
-
|
|
13
|
-
val impl by lazy { MRZScannerModuleImpl(reactApplicationContext) }
|
|
14
|
-
|
|
15
|
-
override fun startMRZScanner(config: ReadableMap, promise: Promise) {
|
|
16
|
-
impl.startMRZScanner(config, promise)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
override fun closeMRZScanner(promise: Promise) {
|
|
20
|
-
impl.closeMRZScanner(promise)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.utility.MultiCrossFilterModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
7
|
-
|
|
8
|
-
class MultiCrossFilterModule(reactApplicationContext: ReactApplicationContext) :
|
|
9
|
-
NativeDynamsoftMultiCrossFilterModuleSpec(reactApplicationContext) {
|
|
10
|
-
private val impl = MultiCrossFilterModuleImpl(reactApplicationContext)
|
|
11
|
-
override fun getName(): String = impl.getName()
|
|
12
|
-
override fun createInstance(): String = impl.createInstance()
|
|
13
|
-
|
|
14
|
-
override fun destroy(filterId: String) {
|
|
15
|
-
impl.destroy(filterId)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
override fun enableResultCrossVerification(filterId: String, resultItemTypes: Double, enable: Boolean) {
|
|
19
|
-
impl.enableResultCrossVerification(filterId, resultItemTypes.toInt(), enable)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
override fun isResultCrossVerificationEnabled(filterId: String, type: Double, promise: Promise) {
|
|
23
|
-
impl.isResultDeduplicationEnabled(filterId, type.toInt(), promise)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
override fun enableResultDeduplication(filterId: String, resultItemTypes: Double, enable: Boolean) {
|
|
27
|
-
impl.enableResultDeduplication(filterId, resultItemTypes.toInt(), enable)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
override fun isResultDeduplicationEnabled(filterId: String, type: Double, promise: Promise) {
|
|
31
|
-
impl.isResultDeduplicationEnabled(filterId, type.toInt(), promise)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
override fun setDuplicateForgetTime(filterId: String, resultItemTypes: Double, time: Double) {
|
|
35
|
-
impl.setDuplicateForgetTime(filterId, resultItemTypes.toInt(), time.toInt())
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
override fun getDuplicateForgetTime(filterId: String, type: Double, promise: Promise) {
|
|
39
|
-
impl.getDuplicateForgetTime(filterId, type.toInt(), promise)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
override fun enableLatestOverlapping(filterId: String, resultItemTypes: Double, enable: Boolean) {
|
|
43
|
-
impl.enableLatestOverlapping(filterId, resultItemTypes.toInt(), enable)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
override fun isLatestOverlappingEnabled(filterId: String, type: Double, promise: Promise) {
|
|
47
|
-
impl.isLatestOverlappingEnabled(filterId, type.toInt(), promise)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
override fun setMaxOverlappingFrames(filterId: String, resultItemTypes: Double, maxFrameToCheck: Double) {
|
|
51
|
-
impl.setMaxOverlappingFrames(filterId, resultItemTypes.toInt(), maxFrameToCheck.toInt())
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
override fun getMaxOverlappingFrames(filterId: String, type: Double, promise: Promise) {
|
|
55
|
-
impl.getMaxOverlappingFrames(filterId, type.toInt(), promise)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.core.basic_structures.CoreModule
|
|
4
|
-
import com.dynamsoft.cvr.CaptureVisionRouterModule
|
|
5
|
-
import com.dynamsoft.dbr.BarcodeReaderModule
|
|
6
|
-
import com.dynamsoft.dce.CameraEnhancerModule
|
|
7
|
-
import com.dynamsoft.dcp.CodeParserModule
|
|
8
|
-
import com.dynamsoft.dcp.dedicator.CodePaserDedicatorModule
|
|
9
|
-
import com.dynamsoft.ddn.DocumentNormalizerModule
|
|
10
|
-
import com.dynamsoft.dip.ImageProcessingModule
|
|
11
|
-
import com.dynamsoft.dlr.LabelRecognizerModule
|
|
12
|
-
import com.dynamsoft.dnn.NeuralNetworkModule
|
|
13
|
-
import com.dynamsoft.license.LicenseModule
|
|
14
|
-
import com.dynamsoft.utility.UtilityModule
|
|
15
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
16
|
-
|
|
17
|
-
class VersionsModule(reactContext: ReactApplicationContext) : NativeDynamsoftVersionsModuleSpec(reactContext) {
|
|
18
|
-
companion object {
|
|
19
|
-
const val NAME = "DynamsoftVersionsModule"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
override fun getName(): String = NAME
|
|
23
|
-
|
|
24
|
-
override fun getTypedExportedConstants(): MutableMap<String, Any> = hashMapOf(
|
|
25
|
-
"versions" to hashMapOf<String, String>(
|
|
26
|
-
"core" to CoreModule.getVersion(),
|
|
27
|
-
"cvr" to CaptureVisionRouterModule.getVersion(),
|
|
28
|
-
"license" to LicenseModule.getVersion(),
|
|
29
|
-
"dce" to CameraEnhancerModule.getVersion(),
|
|
30
|
-
"dbr" to BarcodeReaderModule.getVersion(),
|
|
31
|
-
"dlr" to LabelRecognizerModule.getVersion(),
|
|
32
|
-
"ddn" to DocumentNormalizerModule.getVersion(),
|
|
33
|
-
"dnn" to NeuralNetworkModule.getVersion(),
|
|
34
|
-
"utility" to UtilityModule.getVersion(),
|
|
35
|
-
"dcp" to CodeParserModule.getVersion(),
|
|
36
|
-
"dcpd" to CodePaserDedicatorModule.getVersion(),
|
|
37
|
-
"dip" to ImageProcessingModule.getVersion()
|
|
38
|
-
)
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
package com.dynamsoft.reactnativelib
|
|
2
|
-
|
|
3
|
-
import com.dynamsoft.reactnativelib.rtu.BarcodeScannerModuleImpl
|
|
4
|
-
import com.facebook.react.bridge.Promise
|
|
5
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
7
|
-
import com.facebook.react.bridge.ReactMethod
|
|
8
|
-
import com.facebook.react.bridge.ReadableMap
|
|
9
|
-
|
|
10
|
-
class BarcodeScannerModule(reactApplicationContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactApplicationContext) {
|
|
11
|
-
override fun getName() = BarcodeScannerModuleImpl.NAME
|
|
12
|
-
|
|
13
|
-
val impl by lazy { BarcodeScannerModuleImpl(reactApplicationContext) }
|
|
14
|
-
|
|
15
|
-
@ReactMethod
|
|
16
|
-
fun startBarcodeScanner(config: ReadableMap, promise: Promise) {
|
|
17
|
-
impl.startBarcodeScanner(config, promise)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@ReactMethod
|
|
21
|
-
fun closeBarcodeScanner(promise: Promise) {
|
|
22
|
-
impl.closeBarcodeScanner(promise)
|
|
23
|
-
}
|
|
24
|
-
}
|