barkoder-nativescript 1.3.0 → 1.5.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/barkoder-nativescript.android.ts +1098 -813
- package/barkoder-nativescript.common.ts +4 -1
- package/barkoder-nativescript.ios.ts +1146 -818
- package/package.json +1 -1
- package/platforms/android/barkoder.aar +0 -0
- package/platforms/ios/Barkoder.xcframework/Info.plist +5 -5
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Barkoder +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Headers/iBarkoder.h +103 -14
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Info.plist +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/default.metallib +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/metadata.json +85 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/model.mil +753 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/metadata.json +85 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/model.mil +753 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/mrz.traineddata +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/mrzfast.traineddata +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Barkoder +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Headers/iBarkoder.h +103 -14
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Info.plist +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/_CodeSignature/CodeResources +137 -5
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/default.metallib +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/metadata.json +85 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/model.mil +753 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/metadata.json +85 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/model.mil +753 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/mrz.traineddata +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/mrzfast.traineddata +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/BarkoderSDK +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Headers/BarkoderSDK-Swift.h +49 -30
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Info.plist +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.abi.json +1118 -377
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/templates.json +203 -17
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/BarkoderSDK +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Headers/BarkoderSDK-Swift.h +98 -60
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Info.plist +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1118 -377
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1118 -377
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -1
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/_CodeSignature/CodeResources +25 -85
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/templates.json +203 -17
- package/typings/ios/objc!Barkoder.d.ts +11 -1
- package/README.md +0 -115
|
@@ -1,840 +1,1125 @@
|
|
|
1
|
-
import { BarkoderConstants } from
|
|
1
|
+
import { BarkoderConstants } from "./barkoder-nativescript.common";
|
|
2
2
|
import * as application from "@nativescript/core/application";
|
|
3
|
-
import { View } from
|
|
4
|
-
import { BarkoderView } from
|
|
3
|
+
import { View } from "@nativescript/core";
|
|
4
|
+
import { BarkoderView } from "./barkoder-nativescript.common";
|
|
5
5
|
|
|
6
|
-
const androidSupport =
|
|
6
|
+
const androidSupport =
|
|
7
|
+
global.androidx && global.androidx.appcompat
|
|
8
|
+
? global.androidx.core.app
|
|
9
|
+
: android.support.v4.app;
|
|
7
10
|
declare const com, global: any;
|
|
8
11
|
|
|
9
12
|
const context = application.android.context;
|
|
10
13
|
const Manifest = android.Manifest;
|
|
11
14
|
|
|
12
|
-
|
|
13
15
|
export class BarkoderViewAndroid extends View {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return this.bkdView.config.getLocationLineColor()
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
setLocationLineColor(locationLineColor : string) : void {
|
|
79
|
-
const locationColor = this.hexToAndroidColor(locationLineColor)
|
|
80
|
-
this.bkdView.config.setLocationLineColor(locationColor)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
setRoiLineColor(roiLineColor: string) : void {
|
|
84
|
-
const roiLineColorHex = this.hexToAndroidColor(roiLineColor)
|
|
85
|
-
this.bkdView.config.setRoiLineColor(roiLineColorHex)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
setRoiLineWidth(roiLineWidth : number) : void {
|
|
89
|
-
this.bkdView.config.setRoiLineWidth(roiLineWidth)
|
|
16
|
+
public bkdView: any;
|
|
17
|
+
public bkd: any;
|
|
18
|
+
public bkdConfig: any;
|
|
19
|
+
public bkdHelper: any;
|
|
20
|
+
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.bkdConfig = com.barkoder.BarkoderConfig;
|
|
24
|
+
this.bkd = new com.barkoder.Barkoder();
|
|
25
|
+
this.bkdView = new com.barkoder.BarkoderView(context, true);
|
|
26
|
+
this.bkdView.config = new com.barkoder.BarkoderConfig(
|
|
27
|
+
context,
|
|
28
|
+
"LICENSE_KEY",
|
|
29
|
+
null
|
|
30
|
+
);
|
|
31
|
+
this.bkdHelper = new com.barkoder.BarkoderHelper();
|
|
32
|
+
this.nativeView = this.bkdView;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initiates the barcode scanning process, allowing the application to detect and decode barcodes from the device's camera feed
|
|
37
|
+
*/
|
|
38
|
+
startScanning(
|
|
39
|
+
BarkoderResultCallback: BarkoderConstants.BarkoderResultCallback
|
|
40
|
+
): void {
|
|
41
|
+
const resultCallback = new com.barkoder.interfaces.BarkoderResultCallback({
|
|
42
|
+
scanningFinished: (
|
|
43
|
+
results: any[],
|
|
44
|
+
thumbnails: any[],
|
|
45
|
+
resultImage: any
|
|
46
|
+
) => {
|
|
47
|
+
BarkoderResultCallback.scanningFinished(
|
|
48
|
+
results,
|
|
49
|
+
thumbnails,
|
|
50
|
+
resultImage
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
this.bkdView.startScanning(resultCallback);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Halts the barcode scanning process, stopping the camera from capturing and processing barcode information
|
|
59
|
+
*/
|
|
60
|
+
stopScanning(): void {
|
|
61
|
+
this.bkdView.stopScanning();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
pauseScanning(): void {
|
|
65
|
+
this.bkdView.pauseScanning();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Checks whether the device has a built-in flash (torch) that can be used for illumination during barcode scanning
|
|
70
|
+
*/
|
|
71
|
+
isFlashAvailable(callback: BarkoderConstants.FlashAvailableCallback) {
|
|
72
|
+
const isFlashAvailableCallback = new com.barkoder.interfaces.FlashAvailableCallback(
|
|
73
|
+
{
|
|
74
|
+
onFlashAvailable: (isFlashAvailable: any) => {
|
|
75
|
+
callback.onFlashAvailable(isFlashAvailable);
|
|
76
|
+
},
|
|
90
77
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
setPinchToZoomEnabled(enabled : boolean) : void {
|
|
114
|
-
this.bkdView.config.setPinchToZoomEnabled(enabled)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
setRegionOfInterestVisible(enabled : boolean) : void {
|
|
118
|
-
this.bkdView.config.setRegionOfInterestVisible(enabled)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
setRegionOfInterest(
|
|
122
|
-
left : number, top : number, width : number, height : number
|
|
123
|
-
) : void {
|
|
124
|
-
this.bkdView.config.setRegionOfInterest(
|
|
125
|
-
left, top, width, height
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
setBeepOnSuccessEnabled(enabled : boolean) : void {
|
|
130
|
-
this.bkdView.config.setBeepOnSuccessEnabled(enabled)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
setVibrateOnSuccessEnabled(enabled: boolean) : void {
|
|
134
|
-
this.bkdView.config.setVibrateOnSuccessEnabled(enabled)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
getEncodingCharacterSet() : any {
|
|
138
|
-
return this.bkdView.config.getDecoderConfig().encodingCharacterSet
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
getDecodingSpeed(): any {
|
|
142
|
-
return this.bkdView.config.getDecoderConfig().decodingSpeed
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
getFormattingType() : any {
|
|
146
|
-
return this.bkdView.config.getDecoderConfig().formattingType
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
setLocationLineWidth(width : number) : void {
|
|
150
|
-
const roundedValue = Math.round(width * 100) / 100;
|
|
151
|
-
this.bkdView.config.setLocationLineWidth(roundedValue);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
getLocationLineWidth(): any {
|
|
155
|
-
return this.bkdView.config.getLocationLineWidth();
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
getRoiLineWidth() : any {
|
|
159
|
-
return this.bkdView.config.getRoiLineWidth()
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
getRoiOverlayBackgroundColorHex() : any {
|
|
163
|
-
return this.bkdView.config.getRoiOverlayBackgroundColor()
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
isCloseSessionOnResultEnabled() : any {
|
|
167
|
-
return this.bkdView.config.isCloseSessionOnResultEnabled()
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
isImageResultEnabled() : any {
|
|
171
|
-
return this.bkdView.config.isImageResultEnabled()
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
isLocationInImageResultEnabled() : any {
|
|
175
|
-
return this.bkdView.config.isLocationInImageResultEnabled()
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
getRegionOfInterest() : any {
|
|
179
|
-
return this.bkdView.config.getRegionOfInterest()
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
getThreadsLimit() : any {
|
|
183
|
-
return this.bkdConfig.GetThreadsLimit()
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
setThreadsLimit(threadsLimit : number) : void {
|
|
187
|
-
this.bkdConfig.SetThreadsLimit(threadsLimit)
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
isLocationInPreviewEnabled() : Promise <any> {
|
|
191
|
-
return this.bkdView.config.isLocationInPreviewEnabled()
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
isPinchToZoomEnabled() : Promise <any> {
|
|
195
|
-
return this.bkdView.config.isPinchToZoomEnabled()
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
isRegionOfInterestVisible() : Promise <any> {
|
|
199
|
-
return this.bkdView.config.isRegionOfInterestVisible()
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
isBeepOnSuccessEnabled() : Promise <any> {
|
|
203
|
-
return this.bkdView.config.isBeepOnSuccessEnabled()
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
isVibrateOnSuccessEnabled() : Promise <any> {
|
|
207
|
-
return this.bkdView.config.isVibrateOnSuccessEnabled()
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
getVersion() : any {
|
|
211
|
-
return com.barkoder.Barkoder.GetVersion()
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
getMsiCheckSumType() : any {
|
|
215
|
-
return this.bkdView.config.getDecoderConfig().Msi.checksumType
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
getCode39CheckSumType() : any {
|
|
219
|
-
return this.bkdView.config.getDecoderConfig().Code39.checksumType
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
getCode11CheckSumType() : any {
|
|
223
|
-
return this.bkdView.config.getDecoderConfig().Code11.checksumType
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
setBarkoderResolution(barkoderResolution : BarkoderConstants.BarkoderResolution) : void {
|
|
227
|
-
if(barkoderResolution == BarkoderConstants.BarkoderResolution.NORMAL) {
|
|
228
|
-
this.bkdView.config.setBarkoderResolution(com.barkoder.enums.BarkoderResolution.Normal);
|
|
229
|
-
;
|
|
230
|
-
} else if (barkoderResolution == BarkoderConstants.BarkoderResolution.HIGH) {
|
|
231
|
-
this.bkdView.config.setBarkoderResolution(com.barkoder.enums.BarkoderResolution.HIGH);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
getBarkoderResolution() : any {
|
|
236
|
-
return this.bkdView.config.getBarkoderResolution()
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
setEncodingCharacterSet(encodingCharSet : any) : void {
|
|
240
|
-
this.bkdView.config.getDecoderConfig().encodingCharacterSet = encodingCharSet
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
setDecodingSpeed(decodingSpeed: BarkoderConstants.DecodingSpeed): void {
|
|
244
|
-
if(decodingSpeed == BarkoderConstants.DecodingSpeed.Slow) {
|
|
245
|
-
this.bkdView.config.getDecoderConfig().decodingSpeed =
|
|
246
|
-
com.barkoder.Barkoder.DecodingSpeed.Slow;
|
|
247
|
-
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Fast){
|
|
248
|
-
this.bkdView.config.getDecoderConfig().decodingSpeed =
|
|
249
|
-
com.barkoder.Barkoder.DecodingSpeed.Fast;
|
|
250
|
-
} else if(decodingSpeed == BarkoderConstants.DecodingSpeed.Normal){
|
|
251
|
-
this.bkdView.config.getDecoderConfig().decodingSpeed =
|
|
252
|
-
com.barkoder.Barkoder.DecodingSpeed.Normal;
|
|
253
|
-
} else {
|
|
254
|
-
console.log("Not avilbilable Decoding Speed")
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
setFormattingType(formattingType: BarkoderConstants.FormattingType) {
|
|
259
|
-
switch (formattingType) {
|
|
260
|
-
case BarkoderConstants.FormattingType.Disabled:
|
|
261
|
-
this.bkdView.config.getDecoderConfig().formattingType
|
|
262
|
-
= com.barkoder.Barkoder.FormattingType.Disabled
|
|
263
|
-
break;
|
|
264
|
-
case BarkoderConstants.FormattingType.Automatic:
|
|
265
|
-
this.bkdView.config.getDecoderConfig().formattingType
|
|
266
|
-
= com.barkoder.Barkoder.FormattingType.Automatic
|
|
267
|
-
break;
|
|
268
|
-
case BarkoderConstants.FormattingType.GS1:
|
|
269
|
-
this.bkdView.config.getDecoderConfig().formattingType
|
|
270
|
-
= com.barkoder.Barkoder.FormattingType.GS1
|
|
271
|
-
break;
|
|
272
|
-
case BarkoderConstants.FormattingType.AAMVA:
|
|
273
|
-
this.bkdView.config.getDecoderConfig().formattingType
|
|
274
|
-
= com.barkoder.Barkoder.FormattingType.AAMVA
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
setMsiCheckSumType(msiCheckSumType : BarkoderConstants.MsiChecksumType) {
|
|
280
|
-
switch (msiCheckSumType) {
|
|
281
|
-
case BarkoderConstants.MsiChecksumType.Disabled:
|
|
282
|
-
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Disabled
|
|
283
|
-
break;
|
|
284
|
-
case BarkoderConstants.MsiChecksumType.Mod10:
|
|
285
|
-
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod10
|
|
286
|
-
break;
|
|
287
|
-
case BarkoderConstants.MsiChecksumType.Mod11:
|
|
288
|
-
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod11
|
|
289
|
-
break;
|
|
290
|
-
case BarkoderConstants.MsiChecksumType.Mod1010:
|
|
291
|
-
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod1010
|
|
292
|
-
break;
|
|
293
|
-
case BarkoderConstants.MsiChecksumType.Mod1110:
|
|
294
|
-
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod1110
|
|
295
|
-
break;
|
|
296
|
-
case BarkoderConstants.MsiChecksumType.Mod11IBM:
|
|
297
|
-
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod11IBM
|
|
298
|
-
break;
|
|
299
|
-
case BarkoderConstants.MsiChecksumType.Mod1110IBM:
|
|
300
|
-
this.bkdView.config.getDecoderConfig().Msi.checksumType = com.barkoder.Barkoder.MsiChecksumType.Mod1110IBM
|
|
301
|
-
break;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
setCode39CheckSumType(code39ChecksumType : BarkoderConstants.Code39ChecksumType) {
|
|
306
|
-
switch(code39ChecksumType) {
|
|
307
|
-
case BarkoderConstants.Code39ChecksumType.Disabled:
|
|
308
|
-
this.bkdView.config.getDecoderConfig().Code39.checksumType = com.barkoder.Barkoder.Code39ChecksumType.Disabled
|
|
309
|
-
break;
|
|
310
|
-
case BarkoderConstants.Code39ChecksumType.Enabled:
|
|
311
|
-
this.bkdView.config.getDecoderConfig().Code39.checksumType = com.barkoder.Barkoder.Code39ChecksumType.Enabled
|
|
312
|
-
break;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
setCode11CheckSumType(code11CheckSumType : BarkoderConstants.Code11ChecksumType) {
|
|
317
|
-
switch(code11CheckSumType) {
|
|
318
|
-
case BarkoderConstants.Code11ChecksumType.Disabled:
|
|
319
|
-
this.bkdView.config.getDecoderConfig().Code11.checksumType = com.barkoder.Barkoder.Code11ChecksumType.Disabled
|
|
320
|
-
break;
|
|
321
|
-
case BarkoderConstants.Code11ChecksumType.Single:
|
|
322
|
-
this.bkdView.config.getDecoderConfig().Code11.checksumType = com.barkoder.Barkoder.Code11ChecksumType.Single
|
|
323
|
-
break;
|
|
324
|
-
case BarkoderConstants.Code11ChecksumType.Double:
|
|
325
|
-
this.bkdView.config.getDecoderConfig().Code11.checksumType = com.barkoder.Barkoder.Code11ChecksumType.Double
|
|
326
|
-
break;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
isBarcodeTypeEnabled(decoder: BarkoderConstants.DecoderType) : boolean {
|
|
331
|
-
switch (decoder) {
|
|
332
|
-
case BarkoderConstants.DecoderType.Aztec:
|
|
333
|
-
return this.bkdView.config.getDecoderConfig().Aztec.enabled;
|
|
334
|
-
case BarkoderConstants.DecoderType.AztecCompact:
|
|
335
|
-
return this.bkdView.config.getDecoderConfig().AztecCompact.enabled;
|
|
336
|
-
case BarkoderConstants.DecoderType.QR:
|
|
337
|
-
return this.bkdView.config.getDecoderConfig().QR.enabled;
|
|
338
|
-
case BarkoderConstants.DecoderType.QRMicro:
|
|
339
|
-
return this.bkdView.config.getDecoderConfig().QRMicro.enabled;
|
|
340
|
-
case BarkoderConstants.DecoderType.Code128:
|
|
341
|
-
return this.bkdView.config.getDecoderConfig().Code128.enabled;
|
|
342
|
-
case BarkoderConstants.DecoderType.Code93:
|
|
343
|
-
return this.bkdView.config.getDecoderConfig().Code93.enabled;
|
|
344
|
-
case BarkoderConstants.DecoderType.Code39:
|
|
345
|
-
return this.bkdView.config.getDecoderConfig().Code39.enabled;
|
|
346
|
-
case BarkoderConstants.DecoderType.Telepen:
|
|
347
|
-
return this.bkdView.config.getDecoderConfig().Telepen.enabled;
|
|
348
|
-
case BarkoderConstants.DecoderType.Code11:
|
|
349
|
-
return this.bkdView.config.getDecoderConfig().Code11.enabled;
|
|
350
|
-
case BarkoderConstants.DecoderType.Msi:
|
|
351
|
-
return this.bkdView.config.getDecoderConfig().Msi.enabled;
|
|
352
|
-
case BarkoderConstants.DecoderType.UpcA:
|
|
353
|
-
return this.bkdView.config.getDecoderConfig().UpcA.enabled;
|
|
354
|
-
case BarkoderConstants.DecoderType.UpcE:
|
|
355
|
-
return this.bkdView.config.getDecoderConfig().UpcE.enabled;
|
|
356
|
-
case BarkoderConstants.DecoderType.UpcE1:
|
|
357
|
-
return this.bkdView.config.getDecoderConfig().UpcE1.enabled;
|
|
358
|
-
case BarkoderConstants.DecoderType.Ean13:
|
|
359
|
-
return this.bkdView.config.getDecoderConfig().Ean13.enabled;
|
|
360
|
-
case BarkoderConstants.DecoderType.Ean8:
|
|
361
|
-
return this.bkdView.config.getDecoderConfig().Ean8.enabled;
|
|
362
|
-
case BarkoderConstants.DecoderType.PDF417:
|
|
363
|
-
return this.bkdView.config.getDecoderConfig().PDF417.enabled;
|
|
364
|
-
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
365
|
-
return this.bkdView.config.getDecoderConfig().PDF417Micro.enabled;
|
|
366
|
-
case BarkoderConstants.DecoderType.Datamatrix:
|
|
367
|
-
return this.bkdView.config.getDecoderConfig().Datamatrix.enabled;
|
|
368
|
-
case BarkoderConstants.DecoderType.Code25:
|
|
369
|
-
return this.bkdView.config.getDecoderConfig().Code25.enabled;
|
|
370
|
-
case BarkoderConstants.DecoderType.Interleaved25:
|
|
371
|
-
return this.bkdView.config.getDecoderConfig().Interleaved25.enabled;
|
|
372
|
-
case BarkoderConstants.DecoderType.ITF14:
|
|
373
|
-
return this.bkdView.config.getDecoderConfig().ITF14.enabled;
|
|
374
|
-
case BarkoderConstants.DecoderType.IATA25:
|
|
375
|
-
return this.bkdView.config.getDecoderConfig().IATA25.enabled;
|
|
376
|
-
case BarkoderConstants.DecoderType.Matrix25:
|
|
377
|
-
return this.bkdView.config.getDecoderConfig().Matrix25.enabled;
|
|
378
|
-
case BarkoderConstants.DecoderType.Datalogic25:
|
|
379
|
-
return this.bkdView.config.getDecoderConfig().Datalogic25.enabled;
|
|
380
|
-
case BarkoderConstants.DecoderType.COOP25:
|
|
381
|
-
return this.bkdView.config.getDecoderConfig().COOP25.enabled;
|
|
382
|
-
case BarkoderConstants.DecoderType.Dotcode:
|
|
383
|
-
return this.bkdView.config.getDecoderConfig().Dotcode.enabled;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
setBarcodeTypeEnabled(decoders: BarkoderConstants.DecoderType[]): void {
|
|
388
|
-
this.bkdView.config.getDecoderConfig().Aztec.enabled = false;
|
|
389
|
-
this.bkdView.config.getDecoderConfig().AztecCompact.enabled = false;
|
|
390
|
-
this.bkdView.config.getDecoderConfig().QR.enabled = false;
|
|
391
|
-
this.bkdView.config.getDecoderConfig().QRMicro.enabled = false;
|
|
392
|
-
this.bkdView.config.getDecoderConfig().Code128.enabled = false;
|
|
393
|
-
this.bkdView.config.getDecoderConfig().Code93.enabled = false;
|
|
394
|
-
this.bkdView.config.getDecoderConfig().Code39.enabled = false;
|
|
395
|
-
this.bkdView.config.getDecoderConfig().Telepen.enabled = false;
|
|
396
|
-
this.bkdView.config.getDecoderConfig().Code11.enabled = false;
|
|
397
|
-
this.bkdView.config.getDecoderConfig().Codabar.enabled = false;
|
|
398
|
-
this.bkdView.config.getDecoderConfig().Msi.enabled = false;
|
|
399
|
-
this.bkdView.config.getDecoderConfig().UpcA.enabled = false;
|
|
400
|
-
this.bkdView.config.getDecoderConfig().UpcE.enabled = false;
|
|
401
|
-
this.bkdView.config.getDecoderConfig().UpcE1.enabled = false;
|
|
402
|
-
this.bkdView.config.getDecoderConfig().Ean13.enabled = false;
|
|
403
|
-
this.bkdView.config.getDecoderConfig().Ean8.enabled = false;
|
|
404
|
-
this.bkdView.config.getDecoderConfig().PDF417.enabled = false;
|
|
405
|
-
this.bkdView.config.getDecoderConfig().PDF417Micro.enabled = false;
|
|
406
|
-
this.bkdView.config.getDecoderConfig().Datamatrix.enabled = false;
|
|
407
|
-
this.bkdView.config.getDecoderConfig().Code25.enabled = false;
|
|
408
|
-
this.bkdView.config.getDecoderConfig().Interleaved25.enabled = false;
|
|
409
|
-
this.bkdView.config.getDecoderConfig().ITF14.enabled = false;
|
|
410
|
-
this.bkdView.config.getDecoderConfig().IATA25.enabled = false;
|
|
411
|
-
this.bkdView.config.getDecoderConfig().Matrix25.enabled = false;
|
|
412
|
-
this.bkdView.config.getDecoderConfig().Datalogic25.enabled = false;
|
|
413
|
-
this.bkdView.config.getDecoderConfig().COOP25.enabled = false;
|
|
414
|
-
this.bkdView.config.getDecoderConfig().Dotcode.enabled = false;
|
|
415
|
-
decoders.forEach((dt: BarkoderConstants.DecoderType) => {
|
|
416
|
-
switch (dt) {
|
|
417
|
-
case BarkoderConstants.DecoderType.Aztec:
|
|
418
|
-
this.bkdView.config.getDecoderConfig().Aztec.enabled = true;
|
|
419
|
-
break;
|
|
420
|
-
case BarkoderConstants.DecoderType.AztecCompact:
|
|
421
|
-
this.bkdView.config.getDecoderConfig().AztecCompact.enabled = true;
|
|
422
|
-
break;
|
|
423
|
-
case BarkoderConstants.DecoderType.QR:
|
|
424
|
-
this.bkdView.config.getDecoderConfig().QR.enabled = true;
|
|
425
|
-
break;
|
|
426
|
-
case BarkoderConstants.DecoderType.QRMicro:
|
|
427
|
-
this.bkdView.config.getDecoderConfig().QRMicro.enabled = true;
|
|
428
|
-
break;
|
|
429
|
-
case BarkoderConstants.DecoderType.Code128:
|
|
430
|
-
this.bkdView.config.getDecoderConfig().Code128.enabled = true;
|
|
431
|
-
break;
|
|
432
|
-
case BarkoderConstants.DecoderType.Code93:
|
|
433
|
-
this.bkdView.config.getDecoderConfig().Code93.enabled = true;
|
|
434
|
-
break;
|
|
435
|
-
case BarkoderConstants.DecoderType.Code39:
|
|
436
|
-
this.bkdView.config.getDecoderConfig().Code39.enabled = true;
|
|
437
|
-
break;
|
|
438
|
-
case BarkoderConstants.DecoderType.Telepen:
|
|
439
|
-
this.bkdView.config.getDecoderConfig().Telepen.enabled = true;
|
|
440
|
-
break;
|
|
441
|
-
case BarkoderConstants.DecoderType.Code11:
|
|
442
|
-
this.bkdView.config.getDecoderConfig().Code11.enabled = true;
|
|
443
|
-
break;
|
|
444
|
-
case BarkoderConstants.DecoderType.Msi:
|
|
445
|
-
this.bkdView.config.getDecoderConfig().Msi.enabled = true;
|
|
446
|
-
break;
|
|
447
|
-
case BarkoderConstants.DecoderType.UpcA:
|
|
448
|
-
this.bkdView.config.getDecoderConfig().UpcA.enabled = true;
|
|
449
|
-
break;
|
|
450
|
-
case BarkoderConstants.DecoderType.UpcE:
|
|
451
|
-
this.bkdView.config.getDecoderConfig().UpcE.enabled = true;
|
|
452
|
-
break;
|
|
453
|
-
case BarkoderConstants.DecoderType.UpcE1:
|
|
454
|
-
this.bkdView.config.getDecoderConfig().UpcE1.enabled = true;
|
|
455
|
-
break;
|
|
456
|
-
case BarkoderConstants.DecoderType.Ean13:
|
|
457
|
-
this.bkdView.config.getDecoderConfig().Ean13.enabled = true;
|
|
458
|
-
break;
|
|
459
|
-
case BarkoderConstants.DecoderType.Ean8:
|
|
460
|
-
this.bkdView.config.getDecoderConfig().Ean8.enabled = true;
|
|
461
|
-
break;
|
|
462
|
-
case BarkoderConstants.DecoderType.PDF417:
|
|
463
|
-
this.bkdView.config.getDecoderConfig().PDF417.enabled = true;
|
|
464
|
-
break;
|
|
465
|
-
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
466
|
-
this.bkdView.config.getDecoderConfig().PDF417Micro.enabled = true;
|
|
467
|
-
break;
|
|
468
|
-
case BarkoderConstants.DecoderType.Datamatrix:
|
|
469
|
-
this.bkdView.config.getDecoderConfig().Datamatrix.enabled = true;
|
|
470
|
-
break;
|
|
471
|
-
case BarkoderConstants.DecoderType.Code25:
|
|
472
|
-
this.bkdView.config.getDecoderConfig().Code25.enabled = true;
|
|
473
|
-
break;
|
|
474
|
-
case BarkoderConstants.DecoderType.Interleaved25:
|
|
475
|
-
this.bkdView.config.getDecoderConfig().Interleaved25.enabled = true;
|
|
476
|
-
break;
|
|
477
|
-
case BarkoderConstants.DecoderType.ITF14:
|
|
478
|
-
this.bkdView.config.getDecoderConfig().ITF14.enabled = true;
|
|
479
|
-
break;
|
|
480
|
-
case BarkoderConstants.DecoderType.IATA25:
|
|
481
|
-
this.bkdView.config.getDecoderConfig().IATA25.enabled = true;
|
|
482
|
-
break;
|
|
483
|
-
case BarkoderConstants.DecoderType.Matrix25:
|
|
484
|
-
this.bkdView.config.getDecoderConfig().Matrix25.enabled = true;
|
|
485
|
-
break;
|
|
486
|
-
case BarkoderConstants.DecoderType.Datalogic25:
|
|
487
|
-
this.bkdView.config.getDecoderConfig().Datalogic25.enabled = true;
|
|
488
|
-
break;
|
|
489
|
-
case BarkoderConstants.DecoderType.COOP25:
|
|
490
|
-
this.bkdView.config.getDecoderConfig().COOP25.enabled = true;
|
|
491
|
-
break;
|
|
492
|
-
case BarkoderConstants.DecoderType.Dotcode:
|
|
493
|
-
this.bkdView.config.getDecoderConfig().Dotcode.enabled = true;
|
|
494
|
-
break;
|
|
495
|
-
default:
|
|
496
|
-
break;
|
|
497
|
-
}
|
|
498
|
-
});
|
|
78
|
+
);
|
|
79
|
+
this.bkdView.isFlashAvailable(isFlashAvailableCallback);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Enables or disables the device's flash (torch) for illumination during barcode scanning
|
|
84
|
+
* @param enabled
|
|
85
|
+
*/
|
|
86
|
+
setFlashEnabled(enabled: boolean): void {
|
|
87
|
+
this.bkdView.setFlashEnabled(enabled);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Retrieves the maximum available zoom factor for the device's camera
|
|
92
|
+
*/
|
|
93
|
+
getMaxZoomFactor(callback: BarkoderConstants.MaxZoomAvailableCallback) {
|
|
94
|
+
const MaxZoomCallback = new com.barkoder.interfaces.MaxZoomAvailableCallback(
|
|
95
|
+
{
|
|
96
|
+
onMaxZoomAvailable: (maxZoomFacttor: any) => {
|
|
97
|
+
callback.onMaxZoomAvailable(maxZoomFacttor);
|
|
98
|
+
},
|
|
499
99
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
100
|
+
);
|
|
101
|
+
this.bkdView.getMaxZoomFactor(MaxZoomCallback);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Sets the zoom factor for the device's camera, adjusting the level of zoom during barcode scanning
|
|
106
|
+
* @param zoomFactor
|
|
107
|
+
*/
|
|
108
|
+
setZoomFactor(zoomFactor: number): void {
|
|
109
|
+
this.bkdView.setZoomFactor(zoomFactor);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Retrieves the hexadecimal color code representing the line color used to indicate the location of detected barcodes
|
|
114
|
+
*/
|
|
115
|
+
getLocationLineColorHex(): any {
|
|
116
|
+
return this.bkdView.config.getLocationLineColor();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Sets the color of the lines used to indicate the location of detected barcodes on the camera feed
|
|
121
|
+
*/
|
|
122
|
+
setLocationLineColor(locationLineColor: string): void {
|
|
123
|
+
const locationColor = this.hexToAndroidColor(locationLineColor);
|
|
124
|
+
this.bkdView.config.setLocationLineColor(locationColor);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Sets the color of the lines outlining the Region of Interest (ROI) for barcode scanning on the camera feed
|
|
129
|
+
*/
|
|
130
|
+
setRoiLineColor(roiLineColor: string): void {
|
|
131
|
+
const roiLineColorHex = this.hexToAndroidColor(roiLineColor);
|
|
132
|
+
this.bkdView.config.setRoiLineColor(roiLineColorHex);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Sets the width of the lines outlining the Region of Interest (ROI) for barcode scanning on the camera feed
|
|
137
|
+
*/
|
|
138
|
+
setRoiLineWidth(roiLineWidth: number): void {
|
|
139
|
+
this.bkdView.config.setRoiLineWidth(roiLineWidth);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Sets the background color of the overlay within the Region of Interest (ROI) for barcode scanning on the camera feed
|
|
144
|
+
*/
|
|
145
|
+
setRoiOverlayBackgroundColor(roiOverlayBackgroundColor): void {
|
|
146
|
+
const roiOberlayBackgroundColor = this.hexToAndroidColor(
|
|
147
|
+
roiOverlayBackgroundColor
|
|
148
|
+
);
|
|
149
|
+
this.bkdView.config.setRoiOverlayBackgroundColor(roiOberlayBackgroundColor);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Enables or disables the automatic closing of the scanning session upon detecting a barcode result
|
|
154
|
+
*/
|
|
155
|
+
setCloseSessionOnResultEnabled(enabled: boolean): void {
|
|
156
|
+
this.bkdView.config.setCloseSessionOnResultEnabled(enabled);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Enables or disables the capturing and processing of image data when a barcode is successfully detected
|
|
161
|
+
*/
|
|
162
|
+
setImageResultEnabled(enabled: boolean): void {
|
|
163
|
+
this.bkdView.config.setImageResultEnabled(enabled);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Enables or disables the inclusion of barcode location information within the image data result
|
|
168
|
+
*/
|
|
169
|
+
setLocationInImageResultEnabled(enabled: boolean): void {
|
|
170
|
+
this.bkdView.config.setLocationInImageResultEnabled(enabled);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Enables or disables the display of barcode location information on the camera preview
|
|
175
|
+
*/
|
|
176
|
+
setLocationInPreviewEnabled(enabled: boolean): void {
|
|
177
|
+
this.bkdView.config.setLocationInPreviewEnabled(enabled);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Enables or disables the pinch-to-zoom feature for adjusting the zoom level during barcode scanning
|
|
182
|
+
*/
|
|
183
|
+
setPinchToZoomEnabled(enabled: boolean): void {
|
|
184
|
+
this.bkdView.config.setPinchToZoomEnabled(enabled);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Sets the visibility of the Region of Interest (ROI) on the camera preview
|
|
189
|
+
*/
|
|
190
|
+
setRegionOfInterestVisible(enabled: boolean): void {
|
|
191
|
+
this.bkdView.config.setRegionOfInterestVisible(enabled);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Defines the Region of Interest (ROI) on the camera preview for barcode scanning, specifying an area where the application focuses on detecting barcodes
|
|
196
|
+
*/
|
|
197
|
+
setRegionOfInterest(
|
|
198
|
+
left: number,
|
|
199
|
+
top: number,
|
|
200
|
+
width: number,
|
|
201
|
+
height: number
|
|
202
|
+
): void {
|
|
203
|
+
this.bkdView.config.setRegionOfInterest(left, top, width, height);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Enables or disables the audible beep sound upon successfully decoding a barcode
|
|
208
|
+
*/
|
|
209
|
+
setBeepOnSuccessEnabled(enabled: boolean): void {
|
|
210
|
+
this.bkdView.config.setBeepOnSuccessEnabled(enabled);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Enables or disables the device vibration upon successfully decoding a barcode.
|
|
215
|
+
*/
|
|
216
|
+
setVibrateOnSuccessEnabled(enabled: boolean): void {
|
|
217
|
+
this.bkdView.config.setVibrateOnSuccessEnabled(enabled);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Retrieves the character set used for encoding barcode data
|
|
222
|
+
*/
|
|
223
|
+
getEncodingCharacterSet(): any {
|
|
224
|
+
return this.bkdView.config.getDecoderConfig().encodingCharacterSet;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves the current decoding speed setting for barcode scanning
|
|
229
|
+
*/
|
|
230
|
+
getDecodingSpeed(): any {
|
|
231
|
+
return this.bkdView.config.getDecoderConfig().decodingSpeed;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Retrieves the formatting type used for presenting decoded barcode data
|
|
236
|
+
*/
|
|
237
|
+
getFormattingType(): any {
|
|
238
|
+
return this.bkdView.config.getDecoderConfig().formattingType;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Sets the width of the lines indicating the location of detected barcodes on the camera feed
|
|
243
|
+
*/
|
|
244
|
+
setLocationLineWidth(width: number): void {
|
|
245
|
+
const roundedValue = Math.round(width * 100) / 100;
|
|
246
|
+
this.bkdView.config.setLocationLineWidth(roundedValue);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Retrieves the current width setting for the lines indicating the location of detected barcodes on the camera feed
|
|
251
|
+
*/
|
|
252
|
+
getLocationLineWidth(): any {
|
|
253
|
+
return this.bkdView.config.getLocationLineWidth();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Retrieves the current width setting for the lines outlining the Region of Interest (ROI) on the camera preview
|
|
258
|
+
*/
|
|
259
|
+
getRoiLineWidth(): any {
|
|
260
|
+
return this.bkdView.config.getRoiLineWidth();
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Retrieves the hexadecimal color code representing the background color of the overlay within the Region of Interest (ROI) on the camera preview
|
|
265
|
+
*/
|
|
266
|
+
getRoiOverlayBackgroundColorHex(): any {
|
|
267
|
+
return this.bkdView.config.getRoiOverlayBackgroundColor();
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Enables or disables the automatic closing of the scanning session upon detecting a barcode result
|
|
272
|
+
*/
|
|
273
|
+
isCloseSessionOnResultEnabled(): any {
|
|
274
|
+
return this.bkdView.config.isCloseSessionOnResultEnabled();
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Enables or disables the capturing and processing of image data when a barcode is successfully detected
|
|
279
|
+
*/
|
|
280
|
+
isImageResultEnabled(): any {
|
|
281
|
+
return this.bkdView.config.isImageResultEnabled();
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Enables or disables the inclusion of barcode location information within the image data result
|
|
286
|
+
*/
|
|
287
|
+
isLocationInImageResultEnabled(): any {
|
|
288
|
+
return this.bkdView.config.isLocationInImageResultEnabled();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Retrieves the region of interest (ROI)
|
|
293
|
+
*/
|
|
294
|
+
getRegionOfInterest(): any {
|
|
295
|
+
return this.bkdView.config.getRegionOfInterest();
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Retrieves the threads limit
|
|
300
|
+
*/
|
|
301
|
+
getThreadsLimit(): any {
|
|
302
|
+
return this.bkdConfig.GetThreadsLimit();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Sets the threads limit
|
|
307
|
+
*/
|
|
308
|
+
setThreadsLimit(threadsLimit: number): void {
|
|
309
|
+
this.bkdConfig.SetThreadsLimit(threadsLimit);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Checks if location in preview is enabled
|
|
314
|
+
*/
|
|
315
|
+
isLocationInPreviewEnabled(): Promise<any> {
|
|
316
|
+
return this.bkdView.config.isLocationInPreviewEnabled();
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Checks if pinch to zoom is enabled
|
|
321
|
+
*/
|
|
322
|
+
isPinchToZoomEnabled(): Promise<any> {
|
|
323
|
+
return this.bkdView.config.isPinchToZoomEnabled();
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Checks if the region of interest (ROI) is visible
|
|
328
|
+
*/
|
|
329
|
+
isRegionOfInterestVisible(): Promise<any> {
|
|
330
|
+
return this.bkdView.config.isRegionOfInterestVisible();
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Retrieves the value indicating whether a beep sound is played on successful barcode scanning
|
|
335
|
+
*/
|
|
336
|
+
isBeepOnSuccessEnabled(): Promise<any> {
|
|
337
|
+
return this.bkdView.config.isBeepOnSuccessEnabled();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Retrieves the value indicating whether vibration is enabled on successful barcode scanning
|
|
342
|
+
*/
|
|
343
|
+
isVibrateOnSuccessEnabled(): Promise<any> {
|
|
344
|
+
return this.bkdView.config.isVibrateOnSuccessEnabled();
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Retrieves the version of the Barkoder library
|
|
349
|
+
*/
|
|
350
|
+
getVersion(): any {
|
|
351
|
+
return com.barkoder.Barkoder.GetVersion();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Retrieves the MSI checksum type
|
|
356
|
+
*/
|
|
357
|
+
getMsiCheckSumType(): any {
|
|
358
|
+
return this.bkdView.config.getDecoderConfig().Msi.checksumType;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Retrieves the checksum type for Code 39 barcodes
|
|
363
|
+
*/
|
|
364
|
+
getCode39CheckSumType(): any {
|
|
365
|
+
return this.bkdView.config.getDecoderConfig().Code39.checksumType;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Retrieves the Code11 checksum type
|
|
370
|
+
*/
|
|
371
|
+
getCode11CheckSumType(): any {
|
|
372
|
+
return this.bkdView.config.getDecoderConfig().Code11.checksumType;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Sets the resolution for barcode scanning
|
|
377
|
+
*/
|
|
378
|
+
setBarkoderResolution(
|
|
379
|
+
barkoderResolution: BarkoderConstants.BarkoderResolution
|
|
380
|
+
): void {
|
|
381
|
+
if (barkoderResolution == BarkoderConstants.BarkoderResolution.NORMAL) {
|
|
382
|
+
this.bkdView.config.setBarkoderResolution(
|
|
383
|
+
com.barkoder.enums.BarkoderResolution.Normal
|
|
384
|
+
);
|
|
385
|
+
} else if (
|
|
386
|
+
barkoderResolution == BarkoderConstants.BarkoderResolution.HIGH
|
|
387
|
+
) {
|
|
388
|
+
this.bkdView.config.setBarkoderResolution(
|
|
389
|
+
com.barkoder.enums.BarkoderResolution.HIGH
|
|
390
|
+
);
|
|
610
391
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
case BarkoderConstants.DecoderType.Ean8:
|
|
643
|
-
return this.bkdView.config.getDecoderConfig().Ean8.maximumLength
|
|
644
|
-
case BarkoderConstants.DecoderType.PDF417:
|
|
645
|
-
return this.bkdView.config.getDecoderConfig().PDF417.maximumLength
|
|
646
|
-
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
647
|
-
return this.bkdView.config.getDecoderConfig().PDF417Micro.maximumLength
|
|
648
|
-
case BarkoderConstants.DecoderType.Datamatrix:
|
|
649
|
-
return this.bkdView.config.getDecoderConfig().Datamatrix.maximumLength
|
|
650
|
-
case BarkoderConstants.DecoderType.Code25:
|
|
651
|
-
return this.bkdView.config.getDecoderConfig().Code25.maximumLength
|
|
652
|
-
case BarkoderConstants.DecoderType.Interleaved25:
|
|
653
|
-
return this.bkdView.config.getDecoderConfig().Interleaved25.maximumLength
|
|
654
|
-
case BarkoderConstants.DecoderType.ITF14:
|
|
655
|
-
return this.bkdView.config.getDecoderConfig().ITF14.maximumLength
|
|
656
|
-
case BarkoderConstants.DecoderType.IATA25:
|
|
657
|
-
return this.bkdView.config.getDecoderConfig().IATA25.maximumLength
|
|
658
|
-
case BarkoderConstants.DecoderType.Matrix25:
|
|
659
|
-
return this.bkdView.config.getDecoderConfig().Matrix25.maximumLength
|
|
660
|
-
case BarkoderConstants.DecoderType.Datalogic25:
|
|
661
|
-
return this.bkdView.config.getDecoderConfig().Datalogic25.maximumLength
|
|
662
|
-
case BarkoderConstants.DecoderType.COOP25:
|
|
663
|
-
return this.bkdView.config.getDecoderConfig().COOP25.maximumLength
|
|
664
|
-
case BarkoderConstants.DecoderType.Dotcode:
|
|
665
|
-
return this.bkdView.config.getDecoderConfig().Dotcode.maximumLength
|
|
666
|
-
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Retrieves the resolution for barcode scanning
|
|
396
|
+
*/
|
|
397
|
+
getBarkoderResolution(): any {
|
|
398
|
+
return this.bkdView.config.getBarkoderResolution();
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Sets the encoding character set for barcode scanning
|
|
403
|
+
*/
|
|
404
|
+
setEncodingCharacterSet(encodingCharSet: any): void {
|
|
405
|
+
this.bkdView.config.getDecoderConfig().encodingCharacterSet = encodingCharSet;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Sets the decoding speed for barcode scanning
|
|
410
|
+
*/
|
|
411
|
+
setDecodingSpeed(decodingSpeed: BarkoderConstants.DecodingSpeed): void {
|
|
412
|
+
if (decodingSpeed == BarkoderConstants.DecodingSpeed.Slow) {
|
|
413
|
+
this.bkdView.config.getDecoderConfig().decodingSpeed =
|
|
414
|
+
com.barkoder.Barkoder.DecodingSpeed.Slow;
|
|
415
|
+
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Fast) {
|
|
416
|
+
this.bkdView.config.getDecoderConfig().decodingSpeed =
|
|
417
|
+
com.barkoder.Barkoder.DecodingSpeed.Fast;
|
|
418
|
+
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Normal) {
|
|
419
|
+
this.bkdView.config.getDecoderConfig().decodingSpeed =
|
|
420
|
+
com.barkoder.Barkoder.DecodingSpeed.Normal;
|
|
421
|
+
} else {
|
|
422
|
+
console.log("Not avilbilable Decoding Speed");
|
|
667
423
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
case BarkoderConstants.DecoderType.UpcA:
|
|
692
|
-
return this.bkdView.config.getDecoderConfig().UpcA.minimumLength
|
|
693
|
-
case BarkoderConstants.DecoderType.UpcE:
|
|
694
|
-
return this.bkdView.config.getDecoderConfig().UpcE.minimumLength
|
|
695
|
-
case BarkoderConstants.DecoderType.UpcE1:
|
|
696
|
-
return this.bkdView.config.getDecoderConfig().UpcE1.minimumLength
|
|
697
|
-
case BarkoderConstants.DecoderType.Ean13:
|
|
698
|
-
return this.bkdView.config.getDecoderConfig().Ean13.minimumLength
|
|
699
|
-
case BarkoderConstants.DecoderType.Ean8:
|
|
700
|
-
return this.bkdView.config.getDecoderConfig().Ean8.minimumLength
|
|
701
|
-
case BarkoderConstants.DecoderType.PDF417:
|
|
702
|
-
return this.bkdView.config.getDecoderConfig().PDF417.minimumLength
|
|
703
|
-
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
704
|
-
return this.bkdView.config.getDecoderConfig().PDF417Micro.minimumLength
|
|
705
|
-
case BarkoderConstants.DecoderType.Datamatrix:
|
|
706
|
-
return this.bkdView.config.getDecoderConfig().Datamatrix.minimumLength
|
|
707
|
-
case BarkoderConstants.DecoderType.Code25:
|
|
708
|
-
return this.bkdView.config.getDecoderConfig().Code25.minimumLength
|
|
709
|
-
case BarkoderConstants.DecoderType.Interleaved25:
|
|
710
|
-
return this.bkdView.config.getDecoderConfig().Interleaved25.minimumLength
|
|
711
|
-
case BarkoderConstants.DecoderType.ITF14:
|
|
712
|
-
return this.bkdView.config.getDecoderConfig().ITF14.minimumLength
|
|
713
|
-
case BarkoderConstants.DecoderType.IATA25:
|
|
714
|
-
return this.bkdView.config.getDecoderConfig().IATA25.minimumLength
|
|
715
|
-
case BarkoderConstants.DecoderType.Matrix25:
|
|
716
|
-
return this.bkdView.config.getDecoderConfig().Matrix25.minimumLength
|
|
717
|
-
case BarkoderConstants.DecoderType.Datalogic25:
|
|
718
|
-
return this.bkdView.config.getDecoderConfig().Datalogic25.minimumLength
|
|
719
|
-
case BarkoderConstants.DecoderType.COOP25:
|
|
720
|
-
return this.bkdView.config.getDecoderConfig().COOP25.minimumLength
|
|
721
|
-
case BarkoderConstants.DecoderType.Dotcode:
|
|
722
|
-
return this.bkdView.config.getDecoderConfig().Dotcode.minimumLength
|
|
723
|
-
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Sets the formatting type for barcode scanning
|
|
428
|
+
*/
|
|
429
|
+
setFormattingType(formattingType: BarkoderConstants.FormattingType) {
|
|
430
|
+
switch (formattingType) {
|
|
431
|
+
case BarkoderConstants.FormattingType.Disabled:
|
|
432
|
+
this.bkdView.config.getDecoderConfig().formattingType =
|
|
433
|
+
com.barkoder.Barkoder.FormattingType.Disabled;
|
|
434
|
+
break;
|
|
435
|
+
case BarkoderConstants.FormattingType.Automatic:
|
|
436
|
+
this.bkdView.config.getDecoderConfig().formattingType =
|
|
437
|
+
com.barkoder.Barkoder.FormattingType.Automatic;
|
|
438
|
+
break;
|
|
439
|
+
case BarkoderConstants.FormattingType.GS1:
|
|
440
|
+
this.bkdView.config.getDecoderConfig().formattingType =
|
|
441
|
+
com.barkoder.Barkoder.FormattingType.GS1;
|
|
442
|
+
break;
|
|
443
|
+
case BarkoderConstants.FormattingType.AAMVA:
|
|
444
|
+
this.bkdView.config.getDecoderConfig().formattingType =
|
|
445
|
+
com.barkoder.Barkoder.FormattingType.AAMVA;
|
|
446
|
+
break;
|
|
724
447
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Sets the MSI checksum type
|
|
452
|
+
*/
|
|
453
|
+
setMsiCheckSumType(msiCheckSumType: BarkoderConstants.MsiChecksumType) {
|
|
454
|
+
switch (msiCheckSumType) {
|
|
455
|
+
case BarkoderConstants.MsiChecksumType.Disabled:
|
|
456
|
+
this.bkdView.config.getDecoderConfig().Msi.checksumType =
|
|
457
|
+
com.barkoder.Barkoder.MsiChecksumType.Disabled;
|
|
458
|
+
break;
|
|
459
|
+
case BarkoderConstants.MsiChecksumType.Mod10:
|
|
460
|
+
this.bkdView.config.getDecoderConfig().Msi.checksumType =
|
|
461
|
+
com.barkoder.Barkoder.MsiChecksumType.Mod10;
|
|
462
|
+
break;
|
|
463
|
+
case BarkoderConstants.MsiChecksumType.Mod11:
|
|
464
|
+
this.bkdView.config.getDecoderConfig().Msi.checksumType =
|
|
465
|
+
com.barkoder.Barkoder.MsiChecksumType.Mod11;
|
|
466
|
+
break;
|
|
467
|
+
case BarkoderConstants.MsiChecksumType.Mod1010:
|
|
468
|
+
this.bkdView.config.getDecoderConfig().Msi.checksumType =
|
|
469
|
+
com.barkoder.Barkoder.MsiChecksumType.Mod1010;
|
|
470
|
+
break;
|
|
471
|
+
case BarkoderConstants.MsiChecksumType.Mod1110:
|
|
472
|
+
this.bkdView.config.getDecoderConfig().Msi.checksumType =
|
|
473
|
+
com.barkoder.Barkoder.MsiChecksumType.Mod1110;
|
|
474
|
+
break;
|
|
475
|
+
case BarkoderConstants.MsiChecksumType.Mod11IBM:
|
|
476
|
+
this.bkdView.config.getDecoderConfig().Msi.checksumType =
|
|
477
|
+
com.barkoder.Barkoder.MsiChecksumType.Mod11IBM;
|
|
478
|
+
break;
|
|
479
|
+
case BarkoderConstants.MsiChecksumType.Mod1110IBM:
|
|
480
|
+
this.bkdView.config.getDecoderConfig().Msi.checksumType =
|
|
481
|
+
com.barkoder.Barkoder.MsiChecksumType.Mod1110IBM;
|
|
482
|
+
break;
|
|
728
483
|
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Sets the Code39 checksum type
|
|
488
|
+
*/
|
|
489
|
+
setCode39CheckSumType(
|
|
490
|
+
code39ChecksumType: BarkoderConstants.Code39ChecksumType
|
|
491
|
+
) {
|
|
492
|
+
switch (code39ChecksumType) {
|
|
493
|
+
case BarkoderConstants.Code39ChecksumType.Disabled:
|
|
494
|
+
this.bkdView.config.getDecoderConfig().Code39.checksumType =
|
|
495
|
+
com.barkoder.Barkoder.Code39ChecksumType.Disabled;
|
|
496
|
+
break;
|
|
497
|
+
case BarkoderConstants.Code39ChecksumType.Enabled:
|
|
498
|
+
this.bkdView.config.getDecoderConfig().Code39.checksumType =
|
|
499
|
+
com.barkoder.Barkoder.Code39ChecksumType.Enabled;
|
|
500
|
+
break;
|
|
732
501
|
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Sets the Code11 checksum type
|
|
506
|
+
*/
|
|
507
|
+
setCode11CheckSumType(
|
|
508
|
+
code11CheckSumType: BarkoderConstants.Code11ChecksumType
|
|
509
|
+
) {
|
|
510
|
+
switch (code11CheckSumType) {
|
|
511
|
+
case BarkoderConstants.Code11ChecksumType.Disabled:
|
|
512
|
+
this.bkdView.config.getDecoderConfig().Code11.checksumType =
|
|
513
|
+
com.barkoder.Barkoder.Code11ChecksumType.Disabled;
|
|
514
|
+
break;
|
|
515
|
+
case BarkoderConstants.Code11ChecksumType.Single:
|
|
516
|
+
this.bkdView.config.getDecoderConfig().Code11.checksumType =
|
|
517
|
+
com.barkoder.Barkoder.Code11ChecksumType.Single;
|
|
518
|
+
break;
|
|
519
|
+
case BarkoderConstants.Code11ChecksumType.Double:
|
|
520
|
+
this.bkdView.config.getDecoderConfig().Code11.checksumType =
|
|
521
|
+
com.barkoder.Barkoder.Code11ChecksumType.Double;
|
|
522
|
+
break;
|
|
736
523
|
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
this.bkdView.config.getDecoderConfig().
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
this.bkdView.config.getDecoderConfig().
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
this.bkdView.config.getDecoderConfig().
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
this.bkdView.config.
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
return this.bkdView.config.
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
this.bkdView.config.
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Checks if a specific barcode type is enabled
|
|
528
|
+
*/
|
|
529
|
+
isBarcodeTypeEnabled(decoder: BarkoderConstants.DecoderType): boolean {
|
|
530
|
+
switch (decoder) {
|
|
531
|
+
case BarkoderConstants.DecoderType.Aztec:
|
|
532
|
+
return this.bkdView.config.getDecoderConfig().Aztec.enabled;
|
|
533
|
+
case BarkoderConstants.DecoderType.AztecCompact:
|
|
534
|
+
return this.bkdView.config.getDecoderConfig().AztecCompact.enabled;
|
|
535
|
+
case BarkoderConstants.DecoderType.QR:
|
|
536
|
+
return this.bkdView.config.getDecoderConfig().QR.enabled;
|
|
537
|
+
case BarkoderConstants.DecoderType.QRMicro:
|
|
538
|
+
return this.bkdView.config.getDecoderConfig().QRMicro.enabled;
|
|
539
|
+
case BarkoderConstants.DecoderType.Code128:
|
|
540
|
+
return this.bkdView.config.getDecoderConfig().Code128.enabled;
|
|
541
|
+
case BarkoderConstants.DecoderType.Code93:
|
|
542
|
+
return this.bkdView.config.getDecoderConfig().Code93.enabled;
|
|
543
|
+
case BarkoderConstants.DecoderType.Code39:
|
|
544
|
+
return this.bkdView.config.getDecoderConfig().Code39.enabled;
|
|
545
|
+
case BarkoderConstants.DecoderType.Telepen:
|
|
546
|
+
return this.bkdView.config.getDecoderConfig().Telepen.enabled;
|
|
547
|
+
case BarkoderConstants.DecoderType.Code11:
|
|
548
|
+
return this.bkdView.config.getDecoderConfig().Code11.enabled;
|
|
549
|
+
case BarkoderConstants.DecoderType.Msi:
|
|
550
|
+
return this.bkdView.config.getDecoderConfig().Msi.enabled;
|
|
551
|
+
case BarkoderConstants.DecoderType.UpcA:
|
|
552
|
+
return this.bkdView.config.getDecoderConfig().UpcA.enabled;
|
|
553
|
+
case BarkoderConstants.DecoderType.UpcE:
|
|
554
|
+
return this.bkdView.config.getDecoderConfig().UpcE.enabled;
|
|
555
|
+
case BarkoderConstants.DecoderType.UpcE1:
|
|
556
|
+
return this.bkdView.config.getDecoderConfig().UpcE1.enabled;
|
|
557
|
+
case BarkoderConstants.DecoderType.Ean13:
|
|
558
|
+
return this.bkdView.config.getDecoderConfig().Ean13.enabled;
|
|
559
|
+
case BarkoderConstants.DecoderType.Ean8:
|
|
560
|
+
return this.bkdView.config.getDecoderConfig().Ean8.enabled;
|
|
561
|
+
case BarkoderConstants.DecoderType.PDF417:
|
|
562
|
+
return this.bkdView.config.getDecoderConfig().PDF417.enabled;
|
|
563
|
+
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
564
|
+
return this.bkdView.config.getDecoderConfig().PDF417Micro.enabled;
|
|
565
|
+
case BarkoderConstants.DecoderType.Datamatrix:
|
|
566
|
+
return this.bkdView.config.getDecoderConfig().Datamatrix.enabled;
|
|
567
|
+
case BarkoderConstants.DecoderType.Code25:
|
|
568
|
+
return this.bkdView.config.getDecoderConfig().Code25.enabled;
|
|
569
|
+
case BarkoderConstants.DecoderType.Interleaved25:
|
|
570
|
+
return this.bkdView.config.getDecoderConfig().Interleaved25.enabled;
|
|
571
|
+
case BarkoderConstants.DecoderType.ITF14:
|
|
572
|
+
return this.bkdView.config.getDecoderConfig().ITF14.enabled;
|
|
573
|
+
case BarkoderConstants.DecoderType.IATA25:
|
|
574
|
+
return this.bkdView.config.getDecoderConfig().IATA25.enabled;
|
|
575
|
+
case BarkoderConstants.DecoderType.Matrix25:
|
|
576
|
+
return this.bkdView.config.getDecoderConfig().Matrix25.enabled;
|
|
577
|
+
case BarkoderConstants.DecoderType.Datalogic25:
|
|
578
|
+
return this.bkdView.config.getDecoderConfig().Datalogic25.enabled;
|
|
579
|
+
case BarkoderConstants.DecoderType.COOP25:
|
|
580
|
+
return this.bkdView.config.getDecoderConfig().COOP25.enabled;
|
|
581
|
+
case BarkoderConstants.DecoderType.Dotcode:
|
|
582
|
+
return this.bkdView.config.getDecoderConfig().Dotcode.enabled;
|
|
583
|
+
case BarkoderConstants.DecoderType.IDDocument:
|
|
584
|
+
return this.bkdView.config.getDecoderConfig().IDDocument.enabled;
|
|
772
585
|
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Sets whether a specific barcode type is enabled
|
|
590
|
+
*/
|
|
591
|
+
setBarcodeTypeEnabled(decoders: BarkoderConstants.DecoderType[]): void {
|
|
592
|
+
this.bkdView.config.getDecoderConfig().Aztec.enabled = false;
|
|
593
|
+
this.bkdView.config.getDecoderConfig().AztecCompact.enabled = false;
|
|
594
|
+
this.bkdView.config.getDecoderConfig().QR.enabled = false;
|
|
595
|
+
this.bkdView.config.getDecoderConfig().QRMicro.enabled = false;
|
|
596
|
+
this.bkdView.config.getDecoderConfig().Code128.enabled = false;
|
|
597
|
+
this.bkdView.config.getDecoderConfig().Code93.enabled = false;
|
|
598
|
+
this.bkdView.config.getDecoderConfig().Code39.enabled = false;
|
|
599
|
+
this.bkdView.config.getDecoderConfig().Telepen.enabled = false;
|
|
600
|
+
this.bkdView.config.getDecoderConfig().Code11.enabled = false;
|
|
601
|
+
this.bkdView.config.getDecoderConfig().Codabar.enabled = false;
|
|
602
|
+
this.bkdView.config.getDecoderConfig().Msi.enabled = false;
|
|
603
|
+
this.bkdView.config.getDecoderConfig().UpcA.enabled = false;
|
|
604
|
+
this.bkdView.config.getDecoderConfig().UpcE.enabled = false;
|
|
605
|
+
this.bkdView.config.getDecoderConfig().UpcE1.enabled = false;
|
|
606
|
+
this.bkdView.config.getDecoderConfig().Ean13.enabled = false;
|
|
607
|
+
this.bkdView.config.getDecoderConfig().Ean8.enabled = false;
|
|
608
|
+
this.bkdView.config.getDecoderConfig().PDF417.enabled = false;
|
|
609
|
+
this.bkdView.config.getDecoderConfig().PDF417Micro.enabled = false;
|
|
610
|
+
this.bkdView.config.getDecoderConfig().Datamatrix.enabled = false;
|
|
611
|
+
this.bkdView.config.getDecoderConfig().Code25.enabled = false;
|
|
612
|
+
this.bkdView.config.getDecoderConfig().Interleaved25.enabled = false;
|
|
613
|
+
this.bkdView.config.getDecoderConfig().ITF14.enabled = false;
|
|
614
|
+
this.bkdView.config.getDecoderConfig().IATA25.enabled = false;
|
|
615
|
+
this.bkdView.config.getDecoderConfig().Matrix25.enabled = false;
|
|
616
|
+
this.bkdView.config.getDecoderConfig().Datalogic25.enabled = false;
|
|
617
|
+
this.bkdView.config.getDecoderConfig().COOP25.enabled = false;
|
|
618
|
+
this.bkdView.config.getDecoderConfig().Dotcode.enabled = false;
|
|
619
|
+
this.bkdView.config.getDecoderConfig().IDDocument.enabled = false;
|
|
620
|
+
decoders.forEach((dt: BarkoderConstants.DecoderType) => {
|
|
621
|
+
switch (dt) {
|
|
622
|
+
case BarkoderConstants.DecoderType.Aztec:
|
|
623
|
+
this.bkdView.config.getDecoderConfig().Aztec.enabled = true;
|
|
624
|
+
break;
|
|
625
|
+
case BarkoderConstants.DecoderType.AztecCompact:
|
|
626
|
+
this.bkdView.config.getDecoderConfig().AztecCompact.enabled = true;
|
|
627
|
+
break;
|
|
628
|
+
case BarkoderConstants.DecoderType.QR:
|
|
629
|
+
this.bkdView.config.getDecoderConfig().QR.enabled = true;
|
|
630
|
+
break;
|
|
631
|
+
case BarkoderConstants.DecoderType.QRMicro:
|
|
632
|
+
this.bkdView.config.getDecoderConfig().QRMicro.enabled = true;
|
|
633
|
+
break;
|
|
634
|
+
case BarkoderConstants.DecoderType.Code128:
|
|
635
|
+
this.bkdView.config.getDecoderConfig().Code128.enabled = true;
|
|
636
|
+
break;
|
|
637
|
+
case BarkoderConstants.DecoderType.Code93:
|
|
638
|
+
this.bkdView.config.getDecoderConfig().Code93.enabled = true;
|
|
639
|
+
break;
|
|
640
|
+
case BarkoderConstants.DecoderType.Code39:
|
|
641
|
+
this.bkdView.config.getDecoderConfig().Code39.enabled = true;
|
|
642
|
+
break;
|
|
643
|
+
case BarkoderConstants.DecoderType.Telepen:
|
|
644
|
+
this.bkdView.config.getDecoderConfig().Telepen.enabled = true;
|
|
645
|
+
break;
|
|
646
|
+
case BarkoderConstants.DecoderType.Code11:
|
|
647
|
+
this.bkdView.config.getDecoderConfig().Code11.enabled = true;
|
|
648
|
+
break;
|
|
649
|
+
case BarkoderConstants.DecoderType.Msi:
|
|
650
|
+
this.bkdView.config.getDecoderConfig().Msi.enabled = true;
|
|
651
|
+
break;
|
|
652
|
+
case BarkoderConstants.DecoderType.UpcA:
|
|
653
|
+
this.bkdView.config.getDecoderConfig().UpcA.enabled = true;
|
|
654
|
+
break;
|
|
655
|
+
case BarkoderConstants.DecoderType.UpcE:
|
|
656
|
+
this.bkdView.config.getDecoderConfig().UpcE.enabled = true;
|
|
657
|
+
break;
|
|
658
|
+
case BarkoderConstants.DecoderType.UpcE1:
|
|
659
|
+
this.bkdView.config.getDecoderConfig().UpcE1.enabled = true;
|
|
660
|
+
break;
|
|
661
|
+
case BarkoderConstants.DecoderType.Ean13:
|
|
662
|
+
this.bkdView.config.getDecoderConfig().Ean13.enabled = true;
|
|
663
|
+
break;
|
|
664
|
+
case BarkoderConstants.DecoderType.Ean8:
|
|
665
|
+
this.bkdView.config.getDecoderConfig().Ean8.enabled = true;
|
|
666
|
+
break;
|
|
667
|
+
case BarkoderConstants.DecoderType.PDF417:
|
|
668
|
+
this.bkdView.config.getDecoderConfig().PDF417.enabled = true;
|
|
669
|
+
break;
|
|
670
|
+
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
671
|
+
this.bkdView.config.getDecoderConfig().PDF417Micro.enabled = true;
|
|
672
|
+
break;
|
|
673
|
+
case BarkoderConstants.DecoderType.Datamatrix:
|
|
674
|
+
this.bkdView.config.getDecoderConfig().Datamatrix.enabled = true;
|
|
675
|
+
break;
|
|
676
|
+
case BarkoderConstants.DecoderType.Code25:
|
|
677
|
+
this.bkdView.config.getDecoderConfig().Code25.enabled = true;
|
|
678
|
+
break;
|
|
679
|
+
case BarkoderConstants.DecoderType.Interleaved25:
|
|
680
|
+
this.bkdView.config.getDecoderConfig().Interleaved25.enabled = true;
|
|
681
|
+
break;
|
|
682
|
+
case BarkoderConstants.DecoderType.ITF14:
|
|
683
|
+
this.bkdView.config.getDecoderConfig().ITF14.enabled = true;
|
|
684
|
+
break;
|
|
685
|
+
case BarkoderConstants.DecoderType.IATA25:
|
|
686
|
+
this.bkdView.config.getDecoderConfig().IATA25.enabled = true;
|
|
687
|
+
break;
|
|
688
|
+
case BarkoderConstants.DecoderType.Matrix25:
|
|
689
|
+
this.bkdView.config.getDecoderConfig().Matrix25.enabled = true;
|
|
690
|
+
break;
|
|
691
|
+
case BarkoderConstants.DecoderType.Datalogic25:
|
|
692
|
+
this.bkdView.config.getDecoderConfig().Datalogic25.enabled = true;
|
|
693
|
+
break;
|
|
694
|
+
case BarkoderConstants.DecoderType.COOP25:
|
|
695
|
+
this.bkdView.config.getDecoderConfig().COOP25.enabled = true;
|
|
696
|
+
break;
|
|
697
|
+
case BarkoderConstants.DecoderType.Dotcode:
|
|
698
|
+
this.bkdView.config.getDecoderConfig().Dotcode.enabled = true;
|
|
699
|
+
break;
|
|
700
|
+
case BarkoderConstants.DecoderType.IDDocument:
|
|
701
|
+
this.bkdView.config.getDecoderConfig().IDDocument.enabled = true;
|
|
702
|
+
break;
|
|
703
|
+
default:
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Sets the length range for the specified barcode type
|
|
711
|
+
*/
|
|
712
|
+
setBarcodeTypeLengthRange(
|
|
713
|
+
decoder: BarkoderConstants.DecoderType,
|
|
714
|
+
minimumLength: number,
|
|
715
|
+
maximumLength: number
|
|
716
|
+
) {
|
|
717
|
+
switch (decoder) {
|
|
718
|
+
case BarkoderConstants.DecoderType.Aztec:
|
|
719
|
+
this.bkdView.config.getDecoderConfig().Aztec.minimumLength = minimumLength;
|
|
720
|
+
this.bkdView.config.getDecoderConfig().Aztec.maximumLength = maximumLength;
|
|
721
|
+
break;
|
|
722
|
+
case BarkoderConstants.DecoderType.AztecCompact:
|
|
723
|
+
this.bkdView.config.getDecoderConfig().AztecCompact.minimumLength = minimumLength;
|
|
724
|
+
this.bkdView.config.getDecoderConfig().AztecCompact.maximumLength = maximumLength;
|
|
725
|
+
break;
|
|
726
|
+
case BarkoderConstants.DecoderType.QR:
|
|
727
|
+
this.bkdView.config.getDecoderConfig().QR.minimumLength = minimumLength;
|
|
728
|
+
this.bkdView.config.getDecoderConfig().QR.maximumLength = maximumLength;
|
|
729
|
+
break;
|
|
730
|
+
case BarkoderConstants.DecoderType.QRMicro:
|
|
731
|
+
this.bkdView.config.getDecoderConfig().QRMicro.minimumLength = minimumLength;
|
|
732
|
+
this.bkdView.config.getDecoderConfig().QRMicro.maximumLength = maximumLength;
|
|
733
|
+
break;
|
|
734
|
+
case BarkoderConstants.DecoderType.Code128:
|
|
735
|
+
this.bkdView.config.getDecoderConfig().Code128.minimumLength = minimumLength;
|
|
736
|
+
this.bkdView.config.getDecoderConfig().Code128.maximumLength = maximumLength;
|
|
737
|
+
break;
|
|
738
|
+
case BarkoderConstants.DecoderType.Code93:
|
|
739
|
+
this.bkdView.config.getDecoderConfig().Code93.minimumLength = minimumLength;
|
|
740
|
+
this.bkdView.config.getDecoderConfig().Code93.maximumLength = maximumLength;
|
|
741
|
+
break;
|
|
742
|
+
case BarkoderConstants.DecoderType.Code39:
|
|
743
|
+
this.bkdView.config.getDecoderConfig().Code39.minimumLength = minimumLength;
|
|
744
|
+
this.bkdView.config.getDecoderConfig().Code39.maximumLength = maximumLength;
|
|
745
|
+
break;
|
|
746
|
+
case BarkoderConstants.DecoderType.Telepen:
|
|
747
|
+
this.bkdView.config.getDecoderConfig().Telepen.minimumLength = minimumLength;
|
|
748
|
+
this.bkdView.config.getDecoderConfig().Telepen.maximumLength = maximumLength;
|
|
749
|
+
break;
|
|
750
|
+
case BarkoderConstants.DecoderType.Code11:
|
|
751
|
+
this.bkdView.config.getDecoderConfig().Code11.minimumLength = minimumLength;
|
|
752
|
+
this.bkdView.config.getDecoderConfig().Code11.maximumLength = maximumLength;
|
|
753
|
+
break;
|
|
754
|
+
case BarkoderConstants.DecoderType.Msi:
|
|
755
|
+
this.bkdView.config.getDecoderConfig().Msi.minimumLength = minimumLength;
|
|
756
|
+
this.bkdView.config.getDecoderConfig().Msi.maximumLength = maximumLength;
|
|
757
|
+
break;
|
|
758
|
+
case BarkoderConstants.DecoderType.UpcA:
|
|
759
|
+
this.bkdView.config.getDecoderConfig().UpcA.minimumLength = minimumLength;
|
|
760
|
+
this.bkdView.config.getDecoderConfig().UpcA.maximumLength = maximumLength;
|
|
761
|
+
break;
|
|
762
|
+
case BarkoderConstants.DecoderType.UpcE:
|
|
763
|
+
this.bkdView.config.getDecoderConfig().UpcE.minimumLength = minimumLength;
|
|
764
|
+
this.bkdView.config.getDecoderConfig().UpcE.maximumLength = maximumLength;
|
|
765
|
+
break;
|
|
766
|
+
case BarkoderConstants.DecoderType.UpcE1:
|
|
767
|
+
this.bkdView.config.getDecoderConfig().UpcE1.minimumLength = minimumLength;
|
|
768
|
+
this.bkdView.config.getDecoderConfig().UpcE1.maximumLength = maximumLength;
|
|
769
|
+
break;
|
|
770
|
+
case BarkoderConstants.DecoderType.Ean13:
|
|
771
|
+
this.bkdView.config.getDecoderConfig().Ean13.minimumLength = minimumLength;
|
|
772
|
+
this.bkdView.config.getDecoderConfig().Ean13.maximumLength = maximumLength;
|
|
773
|
+
break;
|
|
774
|
+
case BarkoderConstants.DecoderType.Ean8:
|
|
775
|
+
this.bkdView.config.getDecoderConfig().Ean8.minimumLength = minimumLength;
|
|
776
|
+
this.bkdView.config.getDecoderConfig().Ean8.maximumLength = maximumLength;
|
|
777
|
+
break;
|
|
778
|
+
case BarkoderConstants.DecoderType.PDF417:
|
|
779
|
+
this.bkdView.config.getDecoderConfig().PDF417.minimumLength = minimumLength;
|
|
780
|
+
this.bkdView.config.getDecoderConfig().PDF417.maximumLength = maximumLength;
|
|
781
|
+
break;
|
|
782
|
+
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
783
|
+
this.bkdView.config.getDecoderConfig().PDF417Micro.minimumLength = minimumLength;
|
|
784
|
+
this.bkdView.config.getDecoderConfig().PDF417Micro.maximumLength = maximumLength;
|
|
785
|
+
break;
|
|
786
|
+
case BarkoderConstants.DecoderType.Datamatrix:
|
|
787
|
+
this.bkdView.config.getDecoderConfig().Datamatrix.minimumLength = minimumLength;
|
|
788
|
+
this.bkdView.config.getDecoderConfig().Datamatrix.maximumLength = maximumLength;
|
|
789
|
+
break;
|
|
790
|
+
case BarkoderConstants.DecoderType.Code25:
|
|
791
|
+
this.bkdView.config.getDecoderConfig().Code25.minimumLength = minimumLength;
|
|
792
|
+
this.bkdView.config.getDecoderConfig().Code25.maximumLength = maximumLength;
|
|
793
|
+
break;
|
|
794
|
+
case BarkoderConstants.DecoderType.Interleaved25:
|
|
795
|
+
this.bkdView.config.getDecoderConfig().Interleaved25.minimumLength = minimumLength;
|
|
796
|
+
this.bkdView.config.getDecoderConfig().Interleaved25.maximumLength = maximumLength;
|
|
797
|
+
break;
|
|
798
|
+
case BarkoderConstants.DecoderType.ITF14:
|
|
799
|
+
this.bkdView.config.getDecoderConfig().ITF14.minimumLength = minimumLength;
|
|
800
|
+
this.bkdView.config.getDecoderConfig().ITF14.maximumLength = maximumLength;
|
|
801
|
+
break;
|
|
802
|
+
case BarkoderConstants.DecoderType.IATA25:
|
|
803
|
+
this.bkdView.config.getDecoderConfig().IATA25.minimumLength = minimumLength;
|
|
804
|
+
this.bkdView.config.getDecoderConfig().IATA25.maximumLength = maximumLength;
|
|
805
|
+
break;
|
|
806
|
+
case BarkoderConstants.DecoderType.Matrix25:
|
|
807
|
+
this.bkdView.config.getDecoderConfig().Matrix25.minimumLength = minimumLength;
|
|
808
|
+
this.bkdView.config.getDecoderConfig().Matrix25.maximumLength = maximumLength;
|
|
809
|
+
break;
|
|
810
|
+
case BarkoderConstants.DecoderType.Datalogic25:
|
|
811
|
+
this.bkdView.config.getDecoderConfig().Datalogic25.minimumLength = minimumLength;
|
|
812
|
+
this.bkdView.config.getDecoderConfig().Datalogic25.maximumLength = maximumLength;
|
|
813
|
+
break;
|
|
814
|
+
case BarkoderConstants.DecoderType.COOP25:
|
|
815
|
+
this.bkdView.config.getDecoderConfig().COOP25.minimumLength = minimumLength;
|
|
816
|
+
this.bkdView.config.getDecoderConfig().COOP25.maximumLength = maximumLength;
|
|
817
|
+
break;
|
|
818
|
+
case BarkoderConstants.DecoderType.Dotcode:
|
|
819
|
+
this.bkdView.config.getDecoderConfig().Dotcode.minimumLength = minimumLength;
|
|
820
|
+
this.bkdView.config.getDecoderConfig().Dotcode.maximumLength = maximumLength;
|
|
821
|
+
break;
|
|
822
|
+
default:
|
|
823
|
+
break;
|
|
776
824
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
getBarcodeTypeMaximumLenght(decoder: BarkoderConstants.DecoderType): any {
|
|
828
|
+
switch (decoder) {
|
|
829
|
+
case BarkoderConstants.DecoderType.Aztec:
|
|
830
|
+
return this.bkdView.config.getDecoderConfig().Aztec.maximumLength;
|
|
831
|
+
case BarkoderConstants.DecoderType.AztecCompact:
|
|
832
|
+
return this.bkdView.config.getDecoderConfig().AztecCompact
|
|
833
|
+
.maximumLength;
|
|
834
|
+
case BarkoderConstants.DecoderType.QR:
|
|
835
|
+
return this.bkdView.config.getDecoderConfig().QR.maximumLength;
|
|
836
|
+
case BarkoderConstants.DecoderType.QRMicro:
|
|
837
|
+
return this.bkdView.config.getDecoderConfig().QRMicro.maximumLength;
|
|
838
|
+
case BarkoderConstants.DecoderType.Code128:
|
|
839
|
+
return this.bkdView.config.getDecoderConfig().Code128.maximumLength;
|
|
840
|
+
case BarkoderConstants.DecoderType.Code93:
|
|
841
|
+
return this.bkdView.config.getDecoderConfig().Code93.maximumLength;
|
|
842
|
+
case BarkoderConstants.DecoderType.Code39:
|
|
843
|
+
return this.bkdView.config.getDecoderConfig().Code39.maximumLength;
|
|
844
|
+
case BarkoderConstants.DecoderType.Telepen:
|
|
845
|
+
return this.bkdView.config.getDecoderConfig().Telepen.maximumLength;
|
|
846
|
+
case BarkoderConstants.DecoderType.Code11:
|
|
847
|
+
return this.bkdView.config.getDecoderConfig().Code11.maximumLength;
|
|
848
|
+
case BarkoderConstants.DecoderType.Msi:
|
|
849
|
+
return this.bkdView.config.getDecoderConfig().Msi.maximumLength;
|
|
850
|
+
case BarkoderConstants.DecoderType.UpcA:
|
|
851
|
+
return this.bkdView.config.getDecoderConfig().UpcA.maximumLength;
|
|
852
|
+
case BarkoderConstants.DecoderType.UpcE:
|
|
853
|
+
return this.bkdView.config.getDecoderConfig().UpcE.maximumLength;
|
|
854
|
+
case BarkoderConstants.DecoderType.UpcE1:
|
|
855
|
+
return this.bkdView.config.getDecoderConfig().UpcE1.maximumLength;
|
|
856
|
+
case BarkoderConstants.DecoderType.Ean13:
|
|
857
|
+
return this.bkdView.config.getDecoderConfig().Ean13.maximumLength;
|
|
858
|
+
case BarkoderConstants.DecoderType.Ean8:
|
|
859
|
+
return this.bkdView.config.getDecoderConfig().Ean8.maximumLength;
|
|
860
|
+
case BarkoderConstants.DecoderType.PDF417:
|
|
861
|
+
return this.bkdView.config.getDecoderConfig().PDF417.maximumLength;
|
|
862
|
+
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
863
|
+
return this.bkdView.config.getDecoderConfig().PDF417Micro.maximumLength;
|
|
864
|
+
case BarkoderConstants.DecoderType.Datamatrix:
|
|
865
|
+
return this.bkdView.config.getDecoderConfig().Datamatrix.maximumLength;
|
|
866
|
+
case BarkoderConstants.DecoderType.Code25:
|
|
867
|
+
return this.bkdView.config.getDecoderConfig().Code25.maximumLength;
|
|
868
|
+
case BarkoderConstants.DecoderType.Interleaved25:
|
|
869
|
+
return this.bkdView.config.getDecoderConfig().Interleaved25
|
|
870
|
+
.maximumLength;
|
|
871
|
+
case BarkoderConstants.DecoderType.ITF14:
|
|
872
|
+
return this.bkdView.config.getDecoderConfig().ITF14.maximumLength;
|
|
873
|
+
case BarkoderConstants.DecoderType.IATA25:
|
|
874
|
+
return this.bkdView.config.getDecoderConfig().IATA25.maximumLength;
|
|
875
|
+
case BarkoderConstants.DecoderType.Matrix25:
|
|
876
|
+
return this.bkdView.config.getDecoderConfig().Matrix25.maximumLength;
|
|
877
|
+
case BarkoderConstants.DecoderType.Datalogic25:
|
|
878
|
+
return this.bkdView.config.getDecoderConfig().Datalogic25.maximumLength;
|
|
879
|
+
case BarkoderConstants.DecoderType.COOP25:
|
|
880
|
+
return this.bkdView.config.getDecoderConfig().COOP25.maximumLength;
|
|
881
|
+
case BarkoderConstants.DecoderType.Dotcode:
|
|
882
|
+
return this.bkdView.config.getDecoderConfig().Dotcode.maximumLength;
|
|
780
883
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
getBarcodeTypeMinimumLenght(decoder: BarkoderConstants.DecoderType): any {
|
|
887
|
+
switch (decoder) {
|
|
888
|
+
case BarkoderConstants.DecoderType.Aztec:
|
|
889
|
+
return this.bkdView.config.getDecoderConfig().Aztec.minimumLength;
|
|
890
|
+
case BarkoderConstants.DecoderType.AztecCompact:
|
|
891
|
+
return this.bkdView.config.getDecoderConfig().AztecCompact
|
|
892
|
+
.minimumLength;
|
|
893
|
+
case BarkoderConstants.DecoderType.QR:
|
|
894
|
+
return this.bkdView.config.getDecoderConfig().QR.minimumLength;
|
|
895
|
+
case BarkoderConstants.DecoderType.QRMicro:
|
|
896
|
+
return this.bkdView.config.getDecoderConfig().QRMicro.minimumLength;
|
|
897
|
+
case BarkoderConstants.DecoderType.Code128:
|
|
898
|
+
return this.bkdView.config.getDecoderConfig().Code128.minimumLength;
|
|
899
|
+
case BarkoderConstants.DecoderType.Code93:
|
|
900
|
+
return this.bkdView.config.getDecoderConfig().Code93.minimumLength;
|
|
901
|
+
case BarkoderConstants.DecoderType.Code39:
|
|
902
|
+
return this.bkdView.config.getDecoderConfig().Code39.minimumLength;
|
|
903
|
+
case BarkoderConstants.DecoderType.Telepen:
|
|
904
|
+
return this.bkdView.config.getDecoderConfig().Telepen.minimumLength;
|
|
905
|
+
case BarkoderConstants.DecoderType.Code11:
|
|
906
|
+
return this.bkdView.config.getDecoderConfig().Code11.minimumLength;
|
|
907
|
+
case BarkoderConstants.DecoderType.Msi:
|
|
908
|
+
return this.bkdView.config.getDecoderConfig().Msi.minimumLength;
|
|
909
|
+
case BarkoderConstants.DecoderType.UpcA:
|
|
910
|
+
return this.bkdView.config.getDecoderConfig().UpcA.minimumLength;
|
|
911
|
+
case BarkoderConstants.DecoderType.UpcE:
|
|
912
|
+
return this.bkdView.config.getDecoderConfig().UpcE.minimumLength;
|
|
913
|
+
case BarkoderConstants.DecoderType.UpcE1:
|
|
914
|
+
return this.bkdView.config.getDecoderConfig().UpcE1.minimumLength;
|
|
915
|
+
case BarkoderConstants.DecoderType.Ean13:
|
|
916
|
+
return this.bkdView.config.getDecoderConfig().Ean13.minimumLength;
|
|
917
|
+
case BarkoderConstants.DecoderType.Ean8:
|
|
918
|
+
return this.bkdView.config.getDecoderConfig().Ean8.minimumLength;
|
|
919
|
+
case BarkoderConstants.DecoderType.PDF417:
|
|
920
|
+
return this.bkdView.config.getDecoderConfig().PDF417.minimumLength;
|
|
921
|
+
case BarkoderConstants.DecoderType.PDF417Micro:
|
|
922
|
+
return this.bkdView.config.getDecoderConfig().PDF417Micro.minimumLength;
|
|
923
|
+
case BarkoderConstants.DecoderType.Datamatrix:
|
|
924
|
+
return this.bkdView.config.getDecoderConfig().Datamatrix.minimumLength;
|
|
925
|
+
case BarkoderConstants.DecoderType.Code25:
|
|
926
|
+
return this.bkdView.config.getDecoderConfig().Code25.minimumLength;
|
|
927
|
+
case BarkoderConstants.DecoderType.Interleaved25:
|
|
928
|
+
return this.bkdView.config.getDecoderConfig().Interleaved25
|
|
929
|
+
.minimumLength;
|
|
930
|
+
case BarkoderConstants.DecoderType.ITF14:
|
|
931
|
+
return this.bkdView.config.getDecoderConfig().ITF14.minimumLength;
|
|
932
|
+
case BarkoderConstants.DecoderType.IATA25:
|
|
933
|
+
return this.bkdView.config.getDecoderConfig().IATA25.minimumLength;
|
|
934
|
+
case BarkoderConstants.DecoderType.Matrix25:
|
|
935
|
+
return this.bkdView.config.getDecoderConfig().Matrix25.minimumLength;
|
|
936
|
+
case BarkoderConstants.DecoderType.Datalogic25:
|
|
937
|
+
return this.bkdView.config.getDecoderConfig().Datalogic25.minimumLength;
|
|
938
|
+
case BarkoderConstants.DecoderType.COOP25:
|
|
939
|
+
return this.bkdView.config.getDecoderConfig().COOP25.minimumLength;
|
|
940
|
+
case BarkoderConstants.DecoderType.Dotcode:
|
|
941
|
+
return this.bkdView.config.getDecoderConfig().Dotcode.minimumLength;
|
|
788
942
|
}
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Sets the maximum number of results to be returned from barcode scanning
|
|
947
|
+
*/
|
|
948
|
+
setMaximumResultsCount(maximumResultsCount: number): void {
|
|
949
|
+
this.bkdView.config.getDecoderConfig().maximumResultsCount = maximumResultsCount;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Sets the delay in milliseconds for considering duplicate barcodes during scanning
|
|
954
|
+
*/
|
|
955
|
+
setDuplicatesDelayMs(duplicateDelayMs: number): void {
|
|
956
|
+
this.bkdView.config.getDecoderConfig().duplicatesDelayMs = duplicateDelayMs;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Sets the caching duration (in milliseconds) for multi-code results
|
|
961
|
+
*/
|
|
962
|
+
setMulticodeCachingDuration(multicodeCachingDuration: number): void {
|
|
963
|
+
this.bkdConfig.SetMulticodeCachingDuration(multicodeCachingDuration);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Sets whether multi-code caching is enabled
|
|
968
|
+
*/
|
|
969
|
+
setMulticodeCachingEnabled(multiCodeCachingEnabled: boolean): void {
|
|
970
|
+
this.bkdConfig.SetMulticodeCachingEnabled(multiCodeCachingEnabled);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Retrieves the maximum number of results to be returned from barcode scanning at once
|
|
975
|
+
*/
|
|
976
|
+
getMaximumResultsCount(): any {
|
|
977
|
+
return this.bkdView.config.getDecoderConfig().maximumResultsCount;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Retrieves the delay in milliseconds for considering duplicate barcodes during scanning
|
|
982
|
+
*/
|
|
983
|
+
getDuplicatesDelayMs(): any {
|
|
984
|
+
return this.bkdView.config.getDecoderConfig().duplicatesDelayMs;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Sets whether the Direct Part Marking (DPM) mode for Datamatrix barcodes is enabled.
|
|
989
|
+
*/
|
|
990
|
+
setDatamatrixDpmModeEnabled(dpmModeEnabled: boolean): void {
|
|
991
|
+
this.bkdView.config.getDecoderConfig().Datamatrix.dpmMode = dpmModeEnabled;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Sets whether the deblurring feature for UPC/EAN barcodes is enabled
|
|
996
|
+
*/
|
|
997
|
+
setUpcEanDeblurEnabled(enabled: boolean): void {
|
|
998
|
+
this.bkdView.config.getDecoderConfig().upcEanDeblur = enabled;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Sets whether the detection of misshaped 1D barcodes is enabled
|
|
1003
|
+
*/
|
|
1004
|
+
setEnableMisshaped1DEnabled(enabled: boolean): void {
|
|
1005
|
+
this.bkdView.config.getDecoderConfig().enableMisshaped1D = enabled;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* Sets whether to enable barcode thumbnail on result
|
|
1010
|
+
*/
|
|
1011
|
+
setBarcodeThumbnailOnResultEnabled(enabled: boolean): void {
|
|
1012
|
+
this.bkdView.config.setThumbnailOnResultEnabled(enabled);
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Retrieve whether to enable barcode thumbnail on result
|
|
1017
|
+
*/
|
|
1018
|
+
isBarcodeThumbnailOnResultEnabled(): any {
|
|
1019
|
+
return this.bkdView.config.getThumbnailOnResulEnabled();
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Sets the threshold between duplicate scans
|
|
1024
|
+
*/
|
|
1025
|
+
setThresholdBetweenDuplicatesScans(
|
|
1026
|
+
thresholdBetweenDuplicatesScans: number
|
|
1027
|
+
): void {
|
|
1028
|
+
this.bkdView.config.setThresholdBetweenDuplicatesScans(
|
|
1029
|
+
thresholdBetweenDuplicatesScans
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Retrieves the threshold between duplicate scans
|
|
1035
|
+
*/
|
|
1036
|
+
getThresholdBetweenDuplicatesScans(): Promise<any> {
|
|
1037
|
+
return this.bkdView.config.getThresholdBetweenDuplicatesScans();
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Retrieves whether multi-code caching is enabled
|
|
1042
|
+
*/
|
|
1043
|
+
getMulticodeCachingEnabled(): any {
|
|
1044
|
+
return this.bkdConfig.IsMulticodeCachingEnabled();
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* Retrieves the caching duration (in milliseconds) for multi-code results
|
|
1049
|
+
*/
|
|
1050
|
+
getMulticodeCachingDuration(): any {
|
|
1051
|
+
return this.bkdConfig.GetMulticodeCachingDuration();
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* Retrieves the value indicating whether deblurring is enabled for UPC/EAN barcodes
|
|
1056
|
+
*/
|
|
1057
|
+
isUpcEanDeblurEnabled(): any {
|
|
1058
|
+
return this.bkdView.config.getDecoderConfig().upcEanDeblur;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Checks if the detection of misshaped 1D barcodes is enabled
|
|
1063
|
+
*/
|
|
1064
|
+
isMisshaped1DEnabled(): any {
|
|
1065
|
+
return this.bkdView.config.getDecoderConfig().enableMisshaped1D;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Checks if VIN restrictions are enabled
|
|
1070
|
+
*/
|
|
1071
|
+
isVINRestrictionsEnabled(): any {
|
|
1072
|
+
return this.bkdView.config.getDecoderConfig().enableVINRestrictions;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Sets whether Vehicle Identification Number (VIN) restrictions are enabled
|
|
1077
|
+
*/
|
|
1078
|
+
setEnableVINRestrictions(vinRestrictionsEnabled: boolean): void {
|
|
1079
|
+
this.bkdView.config.getDecoderConfig().enableVINRestrictions = vinRestrictionsEnabled;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
setLicenseKey(licenseKey: string): void {
|
|
1083
|
+
this.bkdView.config = new com.barkoder.BarkoderConfig(
|
|
1084
|
+
context,
|
|
1085
|
+
licenseKey,
|
|
1086
|
+
null
|
|
1087
|
+
);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Configures the Barkoder functionality based on the provided configuration
|
|
1092
|
+
*/
|
|
1093
|
+
configureBarkoder(config: BarkoderConstants.BarkoderConfig): void {
|
|
1094
|
+
const BarkoderHelper = com.barkoder.BarkoderHelper;
|
|
1095
|
+
const JSONObject = org.json.JSONObject;
|
|
1096
|
+
|
|
1097
|
+
try {
|
|
1098
|
+
const jsonString = config.toJsonString();
|
|
1099
|
+
|
|
1100
|
+
const javaJSONObject = new JSONObject(jsonString);
|
|
1101
|
+
|
|
1102
|
+
BarkoderHelper.applyJsonToConfig(this.bkdView.config, javaJSONObject);
|
|
1103
|
+
} catch (e) {
|
|
1104
|
+
console.error("Error applying JSON to BarkoderConfig:", e);
|
|
792
1105
|
}
|
|
1106
|
+
}
|
|
793
1107
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
1108
|
+
private hexToAndroidColor(hexColor: string): number {
|
|
1109
|
+
hexColor = hexColor.replace("#", "");
|
|
1110
|
+
const red = parseInt(hexColor.substring(0, 2), 16);
|
|
1111
|
+
const green = parseInt(hexColor.substring(2, 4), 16);
|
|
1112
|
+
const blue = parseInt(hexColor.substring(4, 6), 16);
|
|
1113
|
+
const androidColor = android.graphics.Color.rgb(red, green, blue);
|
|
797
1114
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
setLicenseKey(licenseKey: string): void {
|
|
803
|
-
this.bkdView.config = new com.barkoder.BarkoderConfig(context, licenseKey, null);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
configureBarkoder(config: BarkoderConstants.BarkoderConfig): void {
|
|
807
|
-
const BarkoderHelper = com.barkoder.BarkoderHelper;
|
|
808
|
-
const JSONObject = org.json.JSONObject;
|
|
1115
|
+
return androidColor;
|
|
1116
|
+
}
|
|
809
1117
|
|
|
810
|
-
|
|
811
|
-
|
|
1118
|
+
getPropertiesAndMethods(obj: any): void {
|
|
1119
|
+
const propertiesAndMethods: string[] = [];
|
|
812
1120
|
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
BarkoderHelper.applyJsonToConfig(this.bkdView.config, javaJSONObject);
|
|
816
|
-
} catch (e) {
|
|
817
|
-
console.error("Error applying JSON to BarkoderConfig:", e);
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
private hexToAndroidColor(hexColor: string): number {
|
|
822
|
-
hexColor = hexColor.replace("#", "");
|
|
823
|
-
const red = parseInt(hexColor.substring(0, 2), 16);
|
|
824
|
-
const green = parseInt(hexColor.substring(2, 4), 16);
|
|
825
|
-
const blue = parseInt(hexColor.substring(4, 6), 16);
|
|
826
|
-
const androidColor = android.graphics.Color.rgb(red, green, blue);
|
|
827
|
-
|
|
828
|
-
return androidColor;
|
|
1121
|
+
for (let key in obj) {
|
|
1122
|
+
console.log(`Key: ${key}, Value: ${obj[key]}`);
|
|
829
1123
|
}
|
|
830
|
-
|
|
831
|
-
getPropertiesAndMethods(obj: any): void {
|
|
832
|
-
const propertiesAndMethods: string[] = [];
|
|
833
|
-
|
|
834
|
-
for (let key in obj) {
|
|
835
|
-
console.log(`Key: ${key}, Value: ${obj[key]}`);
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
|
|
1124
|
+
}
|
|
839
1125
|
}
|
|
840
|
-
|