react-native-scanbot-barcode-scanner-sdk 3.1.0-beta6 → 3.1.0
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/Libraries.txt +1 -1
- package/RNScanbotBarcodeSDK.podspec +1 -1
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.settings/org.eclipse.buildship.core.prefs +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ObjectMapper.java +5 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkConfiguration.java +10 -1
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkModule.java +1 -1
- package/ios/ScanbotBarcodeSdk.m +10 -0
- package/ios/Utils/BarcodeMapping.h +17 -0
- package/package.json +1 -1
- package/src/configuration.ts +57 -64
- package/src/enum.ts +2 -0
- package/src/model.ts +5 -0
- package/android/.gradle/6.8/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.8/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradlew +0 -185
- package/android/gradlew.bat +0 -89
package/Libraries.txt
CHANGED
|
@@ -2,7 +2,7 @@ Open Source libraries used in the Scanbot Barcode SDK for React Native version 3
|
|
|
2
2
|
|
|
3
3
|
------------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
Open Source libraries used in the Scanbot Barcode Scanner SDK for iOS version 3.1.
|
|
5
|
+
Open Source libraries used in the Scanbot Barcode Scanner SDK for iOS version 3.1.1:
|
|
6
6
|
|
|
7
7
|
BOOST C++ Libraries
|
|
8
8
|
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
2
|
-
gradle.version=
|
|
1
|
+
#Mon Jan 31 14:23:43 CET 2022
|
|
2
|
+
gradle.version=7.1.1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
arguments=
|
|
2
2
|
auto.sync=false
|
|
3
3
|
build.scans.enabled=false
|
|
4
|
-
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.
|
|
4
|
+
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.1.1))
|
|
5
5
|
connection.project.dir=
|
|
6
6
|
eclipse.preferences.version=1
|
|
7
7
|
gradle.user.home=
|
package/android/build.gradle
CHANGED
|
@@ -15,7 +15,7 @@ def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
|
|
|
15
15
|
def DEFAULT_MIN_SDK_VERSION = 21
|
|
16
16
|
def DEFAULT_TARGET_SDK_VERSION = 29
|
|
17
17
|
|
|
18
|
-
def sdkVersion = '3.0
|
|
18
|
+
def sdkVersion = '3.1.0'
|
|
19
19
|
|
|
20
20
|
def safeExtGet(prop, fallback) {
|
|
21
21
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
@@ -63,6 +63,11 @@ public final class ObjectMapper {
|
|
|
63
63
|
continue;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
// The default FRONT camera module should be FRONT_MIRRORED on Android
|
|
67
|
+
if ("cameraModule".equals(prop) && "FRONT".equals(value)) {
|
|
68
|
+
value = "FRONT_MIRRORED";
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
final String setterName = "set" + prop.substring(0, 1).toUpperCase() + prop.substring(1);
|
|
67
72
|
|
|
68
73
|
if (methodMap.containsKey(setterName)) {
|
|
@@ -7,6 +7,7 @@ package io.scanbot.barcodesdk.plugin.reactnative;
|
|
|
7
7
|
|
|
8
8
|
public class ScanbotBarcodeSdkConfiguration {
|
|
9
9
|
private boolean loggingEnabled = false;
|
|
10
|
+
private boolean enableNativeLogging = false;
|
|
10
11
|
private String licenseKey;
|
|
11
12
|
private String storageBaseDirectory = null;
|
|
12
13
|
private boolean useCameraX = false;
|
|
@@ -60,4 +61,12 @@ public class ScanbotBarcodeSdkConfiguration {
|
|
|
60
61
|
public void setAllowXnnpackAcceleration(boolean allowXnnpackAcceleration) {
|
|
61
62
|
this.allowXnnpackAcceleration = allowXnnpackAcceleration;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
|
|
65
|
+
public boolean getEnableNativeLogging() {
|
|
66
|
+
return enableNativeLogging;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public void setEnableNativeLogging(boolean enableNativeLogging) {
|
|
70
|
+
this.enableNativeLogging = enableNativeLogging;
|
|
71
|
+
}
|
|
72
|
+
}
|
package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkModule.java
CHANGED
|
@@ -96,7 +96,7 @@ public class ScanbotBarcodeSdkModule extends ReactContextBaseJavaModule implemen
|
|
|
96
96
|
final String callbackMessage;
|
|
97
97
|
|
|
98
98
|
final ScanbotBarcodeScannerSDKInitializer initializer = new ScanbotBarcodeScannerSDKInitializer();
|
|
99
|
-
initializer.withLogging(configuration.isLoggingEnabled(), configuration.
|
|
99
|
+
initializer.withLogging(configuration.isLoggingEnabled(), configuration.getEnableNativeLogging());
|
|
100
100
|
LogUtils.setLoggingEnabled(configuration.isLoggingEnabled());
|
|
101
101
|
|
|
102
102
|
initializer.allowGpuAcceleration(configuration.getAllowGpuAcceleration());
|
package/ios/ScanbotBarcodeSdk.m
CHANGED
|
@@ -149,6 +149,11 @@ RCT_EXPORT_METHOD(startBarcodeScanner:(NSDictionary*)configuration
|
|
|
149
149
|
|
|
150
150
|
SBSDKUIBarcodeScannerConfiguration* config = [[SBSDKUIBarcodeScannerConfiguration alloc] initWithUIConfiguration:uiConfig textConfiguration:textConfig behaviorConfiguration:behaviorConfig];
|
|
151
151
|
|
|
152
|
+
SBSDKUICameraConfiguration* cameraConfiguration = extractCameraConfiguration(configuration);
|
|
153
|
+
if (cameraConfiguration) {
|
|
154
|
+
config.cameraConfiguration.camera = cameraConfiguration.camera;
|
|
155
|
+
}
|
|
156
|
+
|
|
152
157
|
bool shouldWaitForGeneratedImage = behaviorConfig.barcodeImageGenerationType != SBSDKBarcodeImageGenerationTypeNone;
|
|
153
158
|
BarcodeScannerPromiseProxy* delegate = [[BarcodeScannerPromiseProxy alloc] initWithResolver: resolve
|
|
154
159
|
shouldWaitForGeneratedImage: shouldWaitForGeneratedImage];
|
|
@@ -211,6 +216,11 @@ RCT_EXPORT_METHOD(startBatchBarcodeScanner:(NSDictionary*)configuration
|
|
|
211
216
|
NSArray* machineCodeTypes = extractBarcodeTypesFromConfiguration(configuration);
|
|
212
217
|
NSArray* acceptedDocumentTypes = extractBarcodeDocumentTypesFromConfiguration(configuration);
|
|
213
218
|
|
|
219
|
+
SBSDKUICameraConfiguration* cameraConfiguration = extractCameraConfiguration(configuration);
|
|
220
|
+
if (cameraConfiguration) {
|
|
221
|
+
config.cameraConfiguration.camera = cameraConfiguration.camera;
|
|
222
|
+
}
|
|
223
|
+
|
|
214
224
|
BatchBarcodeScannerPromiseProxy* delegate = [[BatchBarcodeScannerPromiseProxy alloc] initWithResolver:resolve];
|
|
215
225
|
|
|
216
226
|
SBSDKUIBarcodesBatchScannerViewController* viewController = NULL;
|
|
@@ -138,4 +138,21 @@ static inline SBSDKBarcodeMSIPlesseyChecksumAlgorithm extractPlesseyChecksumAlgo
|
|
|
138
138
|
return SBSDKBarcodeMSIPlesseyChecksumAlgorithmMod10;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
static inline SBSDKUICameraConfiguration* extractCameraConfiguration(NSDictionary* configuration) {
|
|
142
|
+
SBSDKUICameraConfiguration* cameraConfiguration = [[SBSDKUICameraConfiguration alloc] init];
|
|
143
|
+
|
|
144
|
+
NSString* cameraModule = [configuration objectForKey:@"cameraModule"];
|
|
145
|
+
if(!cameraModule) {
|
|
146
|
+
return nil;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if ([cameraModule isEqualToString:@"FRONT"]) {
|
|
150
|
+
cameraConfiguration.camera = SBSDKCameraDevice.defaultFrontFacingCamera;
|
|
151
|
+
} else if ([cameraModule isEqualToString:@"BACK"]) {
|
|
152
|
+
cameraConfiguration.camera = SBSDKCameraDevice.defaultBackFacingCamera;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return cameraConfiguration;
|
|
156
|
+
}
|
|
157
|
+
|
|
141
158
|
#endif /* BarcodeMapping_h */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-scanbot-barcode-scanner-sdk",
|
|
3
3
|
"title": "Scanbot Barcode Scanner SDK for React Native",
|
|
4
|
-
"version": "3.1.0
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"description": "React Native plugin for the Scanbot Barcode Scanner SDK on Android and iOS",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
package/src/configuration.ts
CHANGED
|
@@ -9,18 +9,19 @@ import {
|
|
|
9
9
|
BarcodeFormat,
|
|
10
10
|
BarcodeImageGenerationType,
|
|
11
11
|
UIInterfaceOrientationMask,
|
|
12
|
-
EngineMode
|
|
12
|
+
EngineMode,
|
|
13
|
+
CameraModule
|
|
13
14
|
} from "./enum";
|
|
14
15
|
import { MSIPlesseyChecksumAlgorithm } from "./enum";
|
|
15
16
|
|
|
16
17
|
export interface BarcodeScannerConfiguration {
|
|
17
18
|
/**
|
|
18
|
-
* An optional array of barcode document formats that
|
|
19
|
+
* An optional array of barcode document formats that acts as a detection filter.
|
|
19
20
|
* By default all supported document formats will be detected.
|
|
20
21
|
*/
|
|
21
22
|
acceptedDocumentFormats?: BarcodeDocumentFormat[];
|
|
22
23
|
/**
|
|
23
|
-
* Allowed orientations for automatic interface rotations.
|
|
24
|
+
* Allowed orientations for automatic interface rotations.
|
|
24
25
|
*/
|
|
25
26
|
allowedInterfaceOrientations?: UIInterfaceOrientationMask;
|
|
26
27
|
/**
|
|
@@ -40,11 +41,11 @@ export interface BarcodeScannerConfiguration {
|
|
|
40
41
|
*/
|
|
41
42
|
finderLineColor?: string;
|
|
42
43
|
/**
|
|
43
|
-
* Width of finder frame border. Default is 2.
|
|
44
|
+
* Width of the finder frame border. Default is 2.
|
|
44
45
|
*/
|
|
45
46
|
finderLineWidth?: number;
|
|
46
47
|
/**
|
|
47
|
-
* String being displayed as description.
|
|
48
|
+
* String being displayed as the description label.
|
|
48
49
|
*/
|
|
49
50
|
finderTextHint?: string;
|
|
50
51
|
/**
|
|
@@ -52,8 +53,8 @@ export interface BarcodeScannerConfiguration {
|
|
|
52
53
|
*/
|
|
53
54
|
finderTextHintColor?: string;
|
|
54
55
|
/**
|
|
55
|
-
* Aspect ratio of finder frame (width \ height), which is used to build actual finder frame.
|
|
56
|
-
* Default is 1 -
|
|
56
|
+
* Aspect ratio of the finder frame (width \ height), which is used to build the actual finder frame.
|
|
57
|
+
* Default is 1 - which is a square frame (good for QR capturing).
|
|
57
58
|
*/
|
|
58
59
|
finderAspectRatio?: FinderAspectRatio;
|
|
59
60
|
/**
|
|
@@ -61,11 +62,11 @@ export interface BarcodeScannerConfiguration {
|
|
|
61
62
|
*/
|
|
62
63
|
flashButtonTitle?: string;
|
|
63
64
|
/**
|
|
64
|
-
* Foreground color of the flash button when flash is off.
|
|
65
|
+
* Foreground color of the flash button when the flash is off.
|
|
65
66
|
*/
|
|
66
67
|
flashButtonInactiveColor?: string;
|
|
67
68
|
/**
|
|
68
|
-
* Whether flash is toggled on or off.
|
|
69
|
+
* Whether the flash is toggled on or off.
|
|
69
70
|
*/
|
|
70
71
|
flashEnabled?: boolean;
|
|
71
72
|
/**
|
|
@@ -82,13 +83,13 @@ export interface BarcodeScannerConfiguration {
|
|
|
82
83
|
maximumTextLength?: number,
|
|
83
84
|
/**
|
|
84
85
|
* Optional minimum required quiet zone on the barcode.
|
|
85
|
-
* Measured in modules (the size of
|
|
86
|
+
* Measured in modules (the size of narrowest bar in the barcode).
|
|
86
87
|
* The default is 10.
|
|
87
88
|
* NOTE: This feature works on ITF and MSI Plessey barcodes only.
|
|
88
89
|
*/
|
|
89
90
|
minimum1DBarcodesQuietZone?: number
|
|
90
91
|
/**
|
|
91
|
-
* Whether
|
|
92
|
+
* Whether a sound should be played on successful barcode detection.
|
|
92
93
|
*/
|
|
93
94
|
successBeepEnabled?: boolean;
|
|
94
95
|
/**
|
|
@@ -100,12 +101,12 @@ export interface BarcodeScannerConfiguration {
|
|
|
100
101
|
*/
|
|
101
102
|
topBarButtonsColor?: string;
|
|
102
103
|
/**
|
|
103
|
-
* Accepted barcode formats
|
|
104
|
+
* Accepted barcode formats.
|
|
104
105
|
*/
|
|
105
106
|
barcodeFormats?: BarcodeFormat[];
|
|
106
107
|
/**
|
|
107
|
-
* Specifies the way
|
|
108
|
-
* Use
|
|
108
|
+
* Specifies the way a barcode image is generated or disables this generation altogether.
|
|
109
|
+
* Use if you want to receive a full sized image with barcodes. Defaults to NONE.
|
|
109
110
|
*/
|
|
110
111
|
barcodeImageGenerationType?: BarcodeImageGenerationType;
|
|
111
112
|
/**
|
|
@@ -113,13 +114,6 @@ export interface BarcodeScannerConfiguration {
|
|
|
113
114
|
* Android only.
|
|
114
115
|
*/
|
|
115
116
|
useButtonsAllCaps?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* With this option, the scanner assumes that the barcode can be a GS1 barcode, and modify the behavior as needed.
|
|
118
|
-
* You can set it to 'false', if you don't want to see decoded FNC1 characters ("]C1" and ASCII char 29).
|
|
119
|
-
* The default is 'true'.
|
|
120
|
-
* NOTE: Currently works for CODE128 barcodes only!
|
|
121
|
-
*/
|
|
122
|
-
enableGS1Decoding?: boolean;
|
|
123
117
|
/**
|
|
124
118
|
* The relative initial zoom level of the camera in the range [0,1], where 0 is zoomed out and 1 is zoomed in.
|
|
125
119
|
* The default value is 0.
|
|
@@ -127,30 +121,34 @@ export interface BarcodeScannerConfiguration {
|
|
|
127
121
|
cameraZoomFactor?: number;
|
|
128
122
|
/**
|
|
129
123
|
* The engine mode of the barcode recognizer. Defaults to NEXT_GEN.
|
|
130
|
-
* To use legacy recognizer, please specify LEGACY
|
|
124
|
+
* To use the legacy recognizer, please specify LEGACY.
|
|
131
125
|
*/
|
|
132
126
|
engineMode?: EngineMode;
|
|
133
127
|
/**
|
|
134
128
|
* When set to `true`, the scanner assumes that the barcode can be a GS1 barcode.
|
|
135
|
-
* Turn it off
|
|
129
|
+
* Turn it off if you don't want to see decoded FNC1 characters ("]C1" and ASCII char 29).
|
|
136
130
|
* The default value is `true`.
|
|
137
131
|
* NOTE: Currently works for CODE128 barcodes only!
|
|
138
132
|
*/
|
|
139
133
|
gs1DecodingEnabled?: boolean;
|
|
140
134
|
/**
|
|
141
|
-
* The checksum
|
|
135
|
+
* The checksum algorithm for MSI Plessey barcodes.
|
|
142
136
|
* The default value is [MSIPlesseyChecksumAlgorithm.Mod10].
|
|
143
137
|
*/
|
|
144
138
|
msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm;
|
|
145
139
|
/**
|
|
146
|
-
* With this option enabled, the scanner removes
|
|
140
|
+
* With this option enabled, the scanner removes check digits for UPC, EAN and MSI Plessey codes.
|
|
147
141
|
* Has no effect if both single and double digit MSI Plessey checksums are enabled.
|
|
148
|
-
* The default is `false
|
|
142
|
+
* The default is `false`.
|
|
149
143
|
*/
|
|
150
144
|
stripCheckDigits?: boolean;
|
|
151
145
|
/**
|
|
152
|
-
*
|
|
153
|
-
|
|
146
|
+
* The preferred camera module (default: BACK).
|
|
147
|
+
*/
|
|
148
|
+
cameraModule?: CameraModule;
|
|
149
|
+
/**
|
|
150
|
+
* If `true`, enables the mode which slightly decreases the scanning quality and the energy consumption, thus increasing the scanning speed.
|
|
151
|
+
* The default is `false`.
|
|
154
152
|
* Android only.
|
|
155
153
|
*/
|
|
156
154
|
lowPowerMode?: boolean;
|
|
@@ -158,16 +156,16 @@ export interface BarcodeScannerConfiguration {
|
|
|
158
156
|
|
|
159
157
|
export interface BatchBarcodeScannerConfiguration {
|
|
160
158
|
/**
|
|
161
|
-
* An optional array of barcode document formats that
|
|
159
|
+
* An optional array of barcode document formats that acts as a detection filter.
|
|
162
160
|
* By default all supported document formats will be detected.
|
|
163
161
|
*/
|
|
164
162
|
acceptedDocumentFormats?: BarcodeDocumentFormat[];
|
|
165
163
|
/**
|
|
166
|
-
* Allowed orientations for automatic interface rotations.
|
|
164
|
+
* Allowed orientations for automatic interface rotations.
|
|
167
165
|
*/
|
|
168
166
|
allowedInterfaceOrientations?: UIInterfaceOrientationMask;
|
|
169
167
|
/**
|
|
170
|
-
* String used for displaying
|
|
168
|
+
* String used for displaying the numer of scanned barcodes. Use %d for number formatting symbol.
|
|
171
169
|
*/
|
|
172
170
|
barcodesCountText?: string;
|
|
173
171
|
/**
|
|
@@ -179,7 +177,7 @@ export interface BatchBarcodeScannerConfiguration {
|
|
|
179
177
|
*/
|
|
180
178
|
cameraOverlayColor?: string;
|
|
181
179
|
/**
|
|
182
|
-
* Whether the cancel button is hidden or not. (iOS
|
|
180
|
+
* Whether the cancel button is hidden or not. (iOS only).
|
|
183
181
|
*/
|
|
184
182
|
cancelButtonHidden?: boolean;
|
|
185
183
|
/**
|
|
@@ -212,12 +210,12 @@ export interface BatchBarcodeScannerConfiguration {
|
|
|
212
210
|
*/
|
|
213
211
|
detailsPrimaryColor?: string;
|
|
214
212
|
/**
|
|
215
|
-
* String used to show process of fetching mapped data for barcodes.
|
|
213
|
+
* String used to show the process of fetching mapped data for barcodes.
|
|
216
214
|
*/
|
|
217
215
|
fetchingStateText?: string;
|
|
218
216
|
/**
|
|
219
|
-
* Aspect ratio of finder frame (width \ height), which is used to build actual finder frame.
|
|
220
|
-
* Default is 1 -
|
|
217
|
+
* Aspect ratio of the finder frame (width \ height), which is used to build the actual finder frame.
|
|
218
|
+
* Default is 1 - which is a square frame (good for QR capturing).
|
|
221
219
|
*/
|
|
222
220
|
finderAspectRatio?: FinderAspectRatio;
|
|
223
221
|
/**
|
|
@@ -225,11 +223,11 @@ export interface BatchBarcodeScannerConfiguration {
|
|
|
225
223
|
*/
|
|
226
224
|
finderLineColor?: string;
|
|
227
225
|
/**
|
|
228
|
-
* Width of finder frame border. Default is 2.
|
|
226
|
+
* Width of the finder frame border. Default is 2.
|
|
229
227
|
*/
|
|
230
228
|
finderLineWidth?: number;
|
|
231
229
|
/**
|
|
232
|
-
* String being displayed as description.
|
|
230
|
+
* String being displayed as the description label.
|
|
233
231
|
*/
|
|
234
232
|
finderTextHint?: string;
|
|
235
233
|
/**
|
|
@@ -237,7 +235,7 @@ export interface BatchBarcodeScannerConfiguration {
|
|
|
237
235
|
*/
|
|
238
236
|
finderTextHintColor?: string;
|
|
239
237
|
/**
|
|
240
|
-
* Whether flash is toggled on or off.
|
|
238
|
+
* Whether the flash is toggled on or off.
|
|
241
239
|
*/
|
|
242
240
|
flashEnabled?: boolean;
|
|
243
241
|
/**
|
|
@@ -249,7 +247,7 @@ export interface BatchBarcodeScannerConfiguration {
|
|
|
249
247
|
*/
|
|
250
248
|
submitButtonTitle?: string;
|
|
251
249
|
/**
|
|
252
|
-
* Whether
|
|
250
|
+
* Whether a sound should be played on successful barcode detection.
|
|
253
251
|
*/
|
|
254
252
|
successBeepEnabled?: boolean;
|
|
255
253
|
/**
|
|
@@ -261,11 +259,11 @@ export interface BatchBarcodeScannerConfiguration {
|
|
|
261
259
|
*/
|
|
262
260
|
topBarButtonsColor?: string;
|
|
263
261
|
/**
|
|
264
|
-
* Foreground color of the flash button when flash is off.
|
|
262
|
+
* Foreground color of the flash button when the flash is off.
|
|
265
263
|
*/
|
|
266
264
|
topBarButtonsInactiveColor?: string;
|
|
267
265
|
/**
|
|
268
|
-
* Accepted barcode formats
|
|
266
|
+
* Accepted barcode formats.
|
|
269
267
|
*/
|
|
270
268
|
barcodeFormats?: BarcodeFormat[];
|
|
271
269
|
/**
|
|
@@ -287,48 +285,43 @@ export interface BatchBarcodeScannerConfiguration {
|
|
|
287
285
|
maximumTextLength?: number;
|
|
288
286
|
/**
|
|
289
287
|
* Optional minimum required quiet zone on the barcode.
|
|
290
|
-
* Measured in modules (the size of
|
|
288
|
+
* Measured in modules (the size of narrowest bar in the barcode).
|
|
291
289
|
* The default is 10.
|
|
292
290
|
* NOTE: This feature works on ITF and MSI Plessey barcodes only.
|
|
293
291
|
*/
|
|
294
292
|
minimum1DBarcodesQuietZone?: number;
|
|
295
|
-
/**
|
|
296
|
-
* With this option, the scanner assumes that the barcode can be a GS1 barcode, and modify the behavior as needed.
|
|
297
|
-
* You can set it to 'false', if you don't want to see decoded FNC1 characters ("]C1" and ASCII char 29).
|
|
298
|
-
* The default is 'true'.
|
|
299
|
-
* NOTE: Currently works for CODE128 barcodes only!
|
|
300
|
-
*/
|
|
301
|
-
enableGS1Decoding?: boolean;
|
|
302
|
-
|
|
303
293
|
/**
|
|
304
294
|
* The engine mode of the barcode recognizer. Defaults to NEXT_GEN.
|
|
305
|
-
* To use legacy recognizer, please specify LEGACY
|
|
295
|
+
* To use the legacy recognizer, please specify LEGACY.
|
|
306
296
|
*/
|
|
307
297
|
engineMode?: EngineMode;
|
|
308
298
|
|
|
309
299
|
/**
|
|
310
300
|
* When set to `true`, the scanner assumes that the barcode can be a GS1 barcode.
|
|
311
|
-
* Turn it off
|
|
301
|
+
* Turn it off if you don't want to see decoded FNC1 characters ("]C1" and ASCII char 29).
|
|
312
302
|
* The default value is `true`.
|
|
313
303
|
* NOTE: Currently works for CODE128 barcodes only!
|
|
314
304
|
*/
|
|
315
305
|
gs1DecodingEnabled?: boolean;
|
|
316
306
|
|
|
317
307
|
/**
|
|
318
|
-
* The checksum
|
|
308
|
+
* The checksum algorithm for MSI Plessey barcodes.
|
|
319
309
|
* The default value is [MSIPlesseyChecksumAlgorithm.Mod10].
|
|
320
310
|
*/
|
|
321
311
|
msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm;
|
|
322
|
-
|
|
323
312
|
/**
|
|
324
|
-
* With this option enabled, the scanner removes
|
|
313
|
+
* With this option enabled, the scanner removes check digits for UPC, EAN and MSI Plessey codes.
|
|
325
314
|
* Has no effect if both single and double digit MSI Plessey checksums are enabled.
|
|
326
|
-
* The default is `false
|
|
315
|
+
* The default is `false`.
|
|
327
316
|
*/
|
|
328
317
|
stripCheckDigits?: boolean;
|
|
329
318
|
/**
|
|
330
|
-
*
|
|
331
|
-
|
|
319
|
+
* The preferred camera module (default: BACK).
|
|
320
|
+
*/
|
|
321
|
+
cameraModule?: CameraModule;
|
|
322
|
+
/**
|
|
323
|
+
* If `true`, enables the mode which slightly decreases the scanning quality and the energy consumption, thus increasing the scanning speed.
|
|
324
|
+
* The default is `false`.
|
|
332
325
|
* Android only.
|
|
333
326
|
*/
|
|
334
327
|
lowPowerMode?: boolean;
|
|
@@ -336,11 +329,11 @@ export interface BatchBarcodeScannerConfiguration {
|
|
|
336
329
|
|
|
337
330
|
interface InternalBarcodeDetectionCommonParameters {
|
|
338
331
|
/**
|
|
339
|
-
* Accepted barcode formats
|
|
332
|
+
* Accepted barcode formats.
|
|
340
333
|
*/
|
|
341
334
|
barcodeFormats?: BarcodeFormat[];
|
|
342
335
|
/**
|
|
343
|
-
* An optional array of barcode document formats that
|
|
336
|
+
* An optional array of barcode document formats that acts as a detection filter.
|
|
344
337
|
* By default all supported document formats will be detected.
|
|
345
338
|
*/
|
|
346
339
|
acceptedDocumentFormats?: BarcodeDocumentFormat[];
|
|
@@ -358,15 +351,15 @@ interface InternalBarcodeDetectionCommonParameters {
|
|
|
358
351
|
maximumTextLength?: number;
|
|
359
352
|
/**
|
|
360
353
|
* Optional minimum required quiet zone on the barcode.
|
|
361
|
-
* Measured in modules (the size of
|
|
354
|
+
* Measured in modules (the size of narrowest bar in the barcode).
|
|
362
355
|
* The default is 10.
|
|
363
356
|
* NOTE: This feature works on ITF and MSI Plessey barcodes only.
|
|
364
357
|
*/
|
|
365
358
|
minimum1DBarcodesQuietZone?: number;
|
|
366
359
|
/**
|
|
367
|
-
* With this option enabled, the scanner removes
|
|
360
|
+
* With this option enabled, the scanner removes check digits for UPC, EAN and MSI Plessey codes.
|
|
368
361
|
* Has no effect if both single and double digit MSI Plessey checksums are enabled.
|
|
369
|
-
* The default is `false
|
|
362
|
+
* The default is `false`.
|
|
370
363
|
*/
|
|
371
364
|
stripCheckDigits?: boolean;
|
|
372
365
|
}
|
|
@@ -374,7 +367,7 @@ interface InternalBarcodeDetectionCommonParameters {
|
|
|
374
367
|
export interface DetectBarcodesOnImageArguments
|
|
375
368
|
extends InternalBarcodeDetectionCommonParameters {
|
|
376
369
|
/**
|
|
377
|
-
* The input image file URI
|
|
370
|
+
* The input image file URI.
|
|
378
371
|
*/
|
|
379
372
|
imageFileUri: string;
|
|
380
373
|
}
|
package/src/enum.ts
CHANGED
package/src/model.ts
CHANGED
|
@@ -11,6 +11,10 @@ export interface InitializationOptions {
|
|
|
11
11
|
*/
|
|
12
12
|
loggingEnabled?: boolean;
|
|
13
13
|
/**
|
|
14
|
+
* Enables Scanbot SDK Core native logging (default is false; Android only)
|
|
15
|
+
*/
|
|
16
|
+
enableNativeLogging?: boolean;
|
|
17
|
+
/**
|
|
14
18
|
* The quality of stored images, from (1 to 100). Defaults to 80.
|
|
15
19
|
*/
|
|
16
20
|
storageImageQuality?: number;
|
|
@@ -36,6 +40,7 @@ export interface InitializationOptions {
|
|
|
36
40
|
/**
|
|
37
41
|
* Enables/disables XNNPACK acceleration for TensorFlow ML models, which provides
|
|
38
42
|
* highly optimized implementations of floating-point neural network operators (Android only)
|
|
43
|
+
* Default is `true`.
|
|
39
44
|
*/
|
|
40
45
|
allowXnnpackAcceleration?: boolean;
|
|
41
46
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
package/android/gradlew
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
|
|
3
|
-
#
|
|
4
|
-
# Copyright 2015 the original author or authors.
|
|
5
|
-
#
|
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
# you may not use this file except in compliance with the License.
|
|
8
|
-
# You may obtain a copy of the License at
|
|
9
|
-
#
|
|
10
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
#
|
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
# See the License for the specific language governing permissions and
|
|
16
|
-
# limitations under the License.
|
|
17
|
-
#
|
|
18
|
-
|
|
19
|
-
##############################################################################
|
|
20
|
-
##
|
|
21
|
-
## Gradle start up script for UN*X
|
|
22
|
-
##
|
|
23
|
-
##############################################################################
|
|
24
|
-
|
|
25
|
-
# Attempt to set APP_HOME
|
|
26
|
-
# Resolve links: $0 may be a link
|
|
27
|
-
PRG="$0"
|
|
28
|
-
# Need this for relative symlinks.
|
|
29
|
-
while [ -h "$PRG" ] ; do
|
|
30
|
-
ls=`ls -ld "$PRG"`
|
|
31
|
-
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
32
|
-
if expr "$link" : '/.*' > /dev/null; then
|
|
33
|
-
PRG="$link"
|
|
34
|
-
else
|
|
35
|
-
PRG=`dirname "$PRG"`"/$link"
|
|
36
|
-
fi
|
|
37
|
-
done
|
|
38
|
-
SAVED="`pwd`"
|
|
39
|
-
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
40
|
-
APP_HOME="`pwd -P`"
|
|
41
|
-
cd "$SAVED" >/dev/null
|
|
42
|
-
|
|
43
|
-
APP_NAME="Gradle"
|
|
44
|
-
APP_BASE_NAME=`basename "$0"`
|
|
45
|
-
|
|
46
|
-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
47
|
-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
48
|
-
|
|
49
|
-
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
50
|
-
MAX_FD="maximum"
|
|
51
|
-
|
|
52
|
-
warn () {
|
|
53
|
-
echo "$*"
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
die () {
|
|
57
|
-
echo
|
|
58
|
-
echo "$*"
|
|
59
|
-
echo
|
|
60
|
-
exit 1
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
# OS specific support (must be 'true' or 'false').
|
|
64
|
-
cygwin=false
|
|
65
|
-
msys=false
|
|
66
|
-
darwin=false
|
|
67
|
-
nonstop=false
|
|
68
|
-
case "`uname`" in
|
|
69
|
-
CYGWIN* )
|
|
70
|
-
cygwin=true
|
|
71
|
-
;;
|
|
72
|
-
Darwin* )
|
|
73
|
-
darwin=true
|
|
74
|
-
;;
|
|
75
|
-
MINGW* )
|
|
76
|
-
msys=true
|
|
77
|
-
;;
|
|
78
|
-
NONSTOP* )
|
|
79
|
-
nonstop=true
|
|
80
|
-
;;
|
|
81
|
-
esac
|
|
82
|
-
|
|
83
|
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
# Determine the Java command to use to start the JVM.
|
|
87
|
-
if [ -n "$JAVA_HOME" ] ; then
|
|
88
|
-
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
89
|
-
# IBM's JDK on AIX uses strange locations for the executables
|
|
90
|
-
JAVACMD="$JAVA_HOME/jre/sh/java"
|
|
91
|
-
else
|
|
92
|
-
JAVACMD="$JAVA_HOME/bin/java"
|
|
93
|
-
fi
|
|
94
|
-
if [ ! -x "$JAVACMD" ] ; then
|
|
95
|
-
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
96
|
-
|
|
97
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
98
|
-
location of your Java installation."
|
|
99
|
-
fi
|
|
100
|
-
else
|
|
101
|
-
JAVACMD="java"
|
|
102
|
-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
103
|
-
|
|
104
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
105
|
-
location of your Java installation."
|
|
106
|
-
fi
|
|
107
|
-
|
|
108
|
-
# Increase the maximum file descriptors if we can.
|
|
109
|
-
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
|
110
|
-
MAX_FD_LIMIT=`ulimit -H -n`
|
|
111
|
-
if [ $? -eq 0 ] ; then
|
|
112
|
-
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
|
113
|
-
MAX_FD="$MAX_FD_LIMIT"
|
|
114
|
-
fi
|
|
115
|
-
ulimit -n $MAX_FD
|
|
116
|
-
if [ $? -ne 0 ] ; then
|
|
117
|
-
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
|
118
|
-
fi
|
|
119
|
-
else
|
|
120
|
-
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
|
121
|
-
fi
|
|
122
|
-
fi
|
|
123
|
-
|
|
124
|
-
# For Darwin, add options to specify how the application appears in the dock
|
|
125
|
-
if $darwin; then
|
|
126
|
-
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
127
|
-
fi
|
|
128
|
-
|
|
129
|
-
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
130
|
-
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|
131
|
-
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
132
|
-
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
133
|
-
|
|
134
|
-
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
135
|
-
|
|
136
|
-
# We build the pattern for arguments to be converted via cygpath
|
|
137
|
-
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
138
|
-
SEP=""
|
|
139
|
-
for dir in $ROOTDIRSRAW ; do
|
|
140
|
-
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
141
|
-
SEP="|"
|
|
142
|
-
done
|
|
143
|
-
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
144
|
-
# Add a user-defined pattern to the cygpath arguments
|
|
145
|
-
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
146
|
-
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
147
|
-
fi
|
|
148
|
-
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
149
|
-
i=0
|
|
150
|
-
for arg in "$@" ; do
|
|
151
|
-
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
152
|
-
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
153
|
-
|
|
154
|
-
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
155
|
-
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
156
|
-
else
|
|
157
|
-
eval `echo args$i`="\"$arg\""
|
|
158
|
-
fi
|
|
159
|
-
i=`expr $i + 1`
|
|
160
|
-
done
|
|
161
|
-
case $i in
|
|
162
|
-
0) set -- ;;
|
|
163
|
-
1) set -- "$args0" ;;
|
|
164
|
-
2) set -- "$args0" "$args1" ;;
|
|
165
|
-
3) set -- "$args0" "$args1" "$args2" ;;
|
|
166
|
-
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
167
|
-
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
168
|
-
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
169
|
-
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
170
|
-
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
171
|
-
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
172
|
-
esac
|
|
173
|
-
fi
|
|
174
|
-
|
|
175
|
-
# Escape application args
|
|
176
|
-
save () {
|
|
177
|
-
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
|
178
|
-
echo " "
|
|
179
|
-
}
|
|
180
|
-
APP_ARGS=`save "$@"`
|
|
181
|
-
|
|
182
|
-
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
|
183
|
-
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
|
184
|
-
|
|
185
|
-
exec "$JAVACMD" "$@"
|
package/android/gradlew.bat
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
@rem
|
|
2
|
-
@rem Copyright 2015 the original author or authors.
|
|
3
|
-
@rem
|
|
4
|
-
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
@rem you may not use this file except in compliance with the License.
|
|
6
|
-
@rem You may obtain a copy of the License at
|
|
7
|
-
@rem
|
|
8
|
-
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
@rem
|
|
10
|
-
@rem Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
@rem See the License for the specific language governing permissions and
|
|
14
|
-
@rem limitations under the License.
|
|
15
|
-
@rem
|
|
16
|
-
|
|
17
|
-
@if "%DEBUG%" == "" @echo off
|
|
18
|
-
@rem ##########################################################################
|
|
19
|
-
@rem
|
|
20
|
-
@rem Gradle startup script for Windows
|
|
21
|
-
@rem
|
|
22
|
-
@rem ##########################################################################
|
|
23
|
-
|
|
24
|
-
@rem Set local scope for the variables with windows NT shell
|
|
25
|
-
if "%OS%"=="Windows_NT" setlocal
|
|
26
|
-
|
|
27
|
-
set DIRNAME=%~dp0
|
|
28
|
-
if "%DIRNAME%" == "" set DIRNAME=.
|
|
29
|
-
set APP_BASE_NAME=%~n0
|
|
30
|
-
set APP_HOME=%DIRNAME%
|
|
31
|
-
|
|
32
|
-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
33
|
-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
34
|
-
|
|
35
|
-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
36
|
-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
|
37
|
-
|
|
38
|
-
@rem Find java.exe
|
|
39
|
-
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
40
|
-
|
|
41
|
-
set JAVA_EXE=java.exe
|
|
42
|
-
%JAVA_EXE% -version >NUL 2>&1
|
|
43
|
-
if "%ERRORLEVEL%" == "0" goto execute
|
|
44
|
-
|
|
45
|
-
echo.
|
|
46
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
47
|
-
echo.
|
|
48
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
49
|
-
echo location of your Java installation.
|
|
50
|
-
|
|
51
|
-
goto fail
|
|
52
|
-
|
|
53
|
-
:findJavaFromJavaHome
|
|
54
|
-
set JAVA_HOME=%JAVA_HOME:"=%
|
|
55
|
-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
56
|
-
|
|
57
|
-
if exist "%JAVA_EXE%" goto execute
|
|
58
|
-
|
|
59
|
-
echo.
|
|
60
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
61
|
-
echo.
|
|
62
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
63
|
-
echo location of your Java installation.
|
|
64
|
-
|
|
65
|
-
goto fail
|
|
66
|
-
|
|
67
|
-
:execute
|
|
68
|
-
@rem Setup the command line
|
|
69
|
-
|
|
70
|
-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@rem Execute Gradle
|
|
74
|
-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
|
75
|
-
|
|
76
|
-
:end
|
|
77
|
-
@rem End local scope for the variables with windows NT shell
|
|
78
|
-
if "%ERRORLEVEL%"=="0" goto mainEnd
|
|
79
|
-
|
|
80
|
-
:fail
|
|
81
|
-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
82
|
-
rem the _cmd.exe /c_ return code!
|
|
83
|
-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
|
84
|
-
exit /b 1
|
|
85
|
-
|
|
86
|
-
:mainEnd
|
|
87
|
-
if "%OS%"=="Windows_NT" endlocal
|
|
88
|
-
|
|
89
|
-
:omega
|