barkoder-nativescript 1.6.3 → 1.6.5
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 +242 -4
- package/barkoder-nativescript.common.ts +30 -2
- package/barkoder-nativescript.ios.ts +252 -3
- 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 +12 -2
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Info.plist +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Modules/module.modulemap +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_512x384.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/metadata.json +3 -3
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/model.mil +1 -1
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/int8_384x256_small2.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/int8_384x256_small2.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/{ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc → ios-arm64/Barkoder.framework/int8_384x256_small2.mlmodelc}/metadata.json +37 -37
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/int8_384x256_small2.mlmodelc/model/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/int8_384x256_small2.mlmodelc/model.espresso.net +5929 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/int8_384x256_small2.mlmodelc/model.espresso.shape +1915 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/int8_384x256_small2.mlmodelc/model.espresso.weights +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/int8_384x256_small2.mlmodelc/neural_network_optionals/coremldata.bin +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 +12 -2
- 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/Modules/module.modulemap +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/_CodeSignature/CodeResources +78 -49
- 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_512x384.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/metadata.json +4 -4
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/model.mil +1 -1
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/int8_384x256_small2.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/int8_384x256_small2.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/{ios-arm64/Barkoder.framework/float16_384x256.mlmodelc → ios-arm64_x86_64-simulator/Barkoder.framework/int8_384x256_small2.mlmodelc}/metadata.json +37 -37
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/int8_384x256_small2.mlmodelc/model/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/int8_384x256_small2.mlmodelc/model.espresso.net +5929 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/int8_384x256_small2.mlmodelc/model.espresso.shape +1915 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/int8_384x256_small2.mlmodelc/model.espresso.weights +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/int8_384x256_small2.mlmodelc/neural_network_optionals/coremldata.bin +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 +153 -12
- 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 +4172 -181
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +96 -4
- 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 +96 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/templates.json +346 -15
- 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 +306 -24
- 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 +4172 -181
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +96 -4
- 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 +96 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +4172 -181
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +96 -4
- 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 +96 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/_CodeSignature/CodeResources +25 -25
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/templates.json +346 -15
- 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/model.mil +0 -753
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/weights/weight.bin +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/model.mil +0 -753
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/weights/weight.bin +0 -0
|
@@ -35,6 +35,9 @@ export class BarkoderViewAndroid extends View {
|
|
|
35
35
|
this.nativeView = this.bkdView;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
38
41
|
/**
|
|
39
42
|
* Initiates the barcode scanning process, allowing the application to detect and decode barcodes from the device's camera feed
|
|
40
43
|
*/
|
|
@@ -44,19 +47,43 @@ export class BarkoderViewAndroid extends View {
|
|
|
44
47
|
const resultCallback = new com.barkoder.interfaces.BarkoderResultCallback({
|
|
45
48
|
scanningFinished: (
|
|
46
49
|
results: any[],
|
|
47
|
-
thumbnails: any
|
|
50
|
+
thumbnails: any, // not a true JS array!
|
|
48
51
|
resultImage: any
|
|
49
52
|
) => {
|
|
53
|
+
// Convert native array to JS array first
|
|
54
|
+
const jsThumbnails = [];
|
|
55
|
+
for (let i = 0; i < thumbnails.length; i++) {
|
|
56
|
+
jsThumbnails.push(thumbnails[i]);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const convertedThumbnails = jsThumbnails.map((bitmap) => {
|
|
60
|
+
const imgSrc = new ImageSource();
|
|
61
|
+
imgSrc.setNativeSource(bitmap);
|
|
62
|
+
return imgSrc;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const convertedResultImage = new ImageSource();
|
|
66
|
+
convertedResultImage.setNativeSource(resultImage);
|
|
67
|
+
|
|
50
68
|
BarkoderResultCallback.scanningFinished(
|
|
51
69
|
results,
|
|
52
|
-
|
|
53
|
-
|
|
70
|
+
convertedThumbnails,
|
|
71
|
+
convertedResultImage
|
|
54
72
|
);
|
|
55
73
|
},
|
|
56
74
|
});
|
|
75
|
+
|
|
57
76
|
this.bkdView.startScanning(resultCallback);
|
|
58
77
|
}
|
|
59
78
|
|
|
79
|
+
freezeScanning() {
|
|
80
|
+
this.bkdView.freezeScanning()
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
unfreezeScanning(){
|
|
84
|
+
this.bkdView.unfreezeScanning()
|
|
85
|
+
}
|
|
86
|
+
|
|
60
87
|
|
|
61
88
|
scanImage(
|
|
62
89
|
base64Image: string,
|
|
@@ -470,7 +497,11 @@ export class BarkoderViewAndroid extends View {
|
|
|
470
497
|
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Normal) {
|
|
471
498
|
this.bkdView.config.getDecoderConfig().decodingSpeed =
|
|
472
499
|
com.barkoder.Barkoder.DecodingSpeed.Normal;
|
|
473
|
-
} else {
|
|
500
|
+
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Rigorous) {
|
|
501
|
+
this.bkdView.config.getDecoderConfig().decodingSpeed =
|
|
502
|
+
com.barkoder.Barkoder.DecodingSpeed.Rigorous;
|
|
503
|
+
}
|
|
504
|
+
else {
|
|
474
505
|
console.log("Not avilbilable Decoding Speed");
|
|
475
506
|
}
|
|
476
507
|
}
|
|
@@ -654,6 +685,8 @@ export class BarkoderViewAndroid extends View {
|
|
|
654
685
|
return this.bkdView.config.getDecoderConfig().KIX.enabled;
|
|
655
686
|
case BarkoderConstants.DecoderType.JapanesePost:
|
|
656
687
|
return this.bkdView.config.getDecoderConfig().JapanesePost.enabled;
|
|
688
|
+
case BarkoderConstants.DecoderType.MaxiCode:
|
|
689
|
+
return this.bkdView.config.getDecoderConfig().MaxiCode.enabled;
|
|
657
690
|
}
|
|
658
691
|
}
|
|
659
692
|
|
|
@@ -699,6 +732,7 @@ export class BarkoderViewAndroid extends View {
|
|
|
699
732
|
this.bkdView.config.getDecoderConfig().RoyalMail.enabled = false;
|
|
700
733
|
this.bkdView.config.getDecoderConfig().KIX.enabled = false;
|
|
701
734
|
this.bkdView.config.getDecoderConfig().JapanesePost.enabled = false;
|
|
735
|
+
this.bkdView.config.getDecoderConfig().MaxiCode.enabled = false;
|
|
702
736
|
decoders.forEach((dt: BarkoderConstants.DecoderType) => {
|
|
703
737
|
switch (dt) {
|
|
704
738
|
case BarkoderConstants.DecoderType.Aztec:
|
|
@@ -815,6 +849,9 @@ export class BarkoderViewAndroid extends View {
|
|
|
815
849
|
case BarkoderConstants.DecoderType.JapanesePost:
|
|
816
850
|
this.bkdView.config.getDecoderConfig().JapanesePost.enabled = true;
|
|
817
851
|
break;
|
|
852
|
+
case BarkoderConstants.DecoderType.MaxiCode:
|
|
853
|
+
this.bkdView.config.getDecoderConfig().MaxiCode.enabled = true;
|
|
854
|
+
break;
|
|
818
855
|
default:
|
|
819
856
|
break;
|
|
820
857
|
}
|
|
@@ -1099,6 +1136,26 @@ export class BarkoderViewAndroid extends View {
|
|
|
1099
1136
|
return this.bkdView.config.getDecoderConfig().duplicatesDelayMs;
|
|
1100
1137
|
}
|
|
1101
1138
|
|
|
1139
|
+
setARImageResultEnabled(enabled: boolean): void {
|
|
1140
|
+
this.bkdView.config.arConfig.imageResultEnabled = enabled
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
setARBarcodeThumbnailOnResultEnabled(enabled: boolean): void {
|
|
1144
|
+
this.bkdView.config.arConfig.barcodeThumbnailOnResult = enabled
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
isARImageResultEnabled(): any {
|
|
1148
|
+
return this.bkdView.config.arConfig.imageResultEnabled
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
isARBarcodeThumbnailOnResultEnabled(): any {
|
|
1152
|
+
return this.bkdView.config.arConfig.barcodeThumbnailOnResult
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
getCurrentZoomFactor(): any {
|
|
1156
|
+
return this.bkdView.getCurrentZoomFactor()
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1102
1159
|
/**
|
|
1103
1160
|
* Sets whether the Direct Part Marking (DPM) mode for Datamatrix barcodes is enabled.
|
|
1104
1161
|
*/
|
|
@@ -1291,9 +1348,185 @@ export class BarkoderViewAndroid extends View {
|
|
|
1291
1348
|
|
|
1292
1349
|
}
|
|
1293
1350
|
|
|
1351
|
+
setBarkoderARMode(arMode: BarkoderConstants.BarkoderARMode): void {
|
|
1352
|
+
if (arMode == BarkoderConstants.BarkoderARMode.OFF) {
|
|
1353
|
+
this.bkdView.config.arConfig.arMode = com.barkoder.enums.BarkoderARMode.OFF;
|
|
1354
|
+
} else if (arMode == BarkoderConstants.BarkoderARMode.InteractiveDisabled) {
|
|
1355
|
+
this.bkdView.config.arConfig.arMode = com.barkoder.enums.BarkoderARMode.InteractiveDisabled;
|
|
1356
|
+
} else if (arMode == BarkoderConstants.BarkoderARMode.InteractiveEnabled) {
|
|
1357
|
+
this.bkdView.config.arConfig.arMode = com.barkoder.enums.BarkoderARMode.InteractiveEnabled;
|
|
1358
|
+
} else if (arMode == BarkoderConstants.BarkoderARMode.NonInteractive) {
|
|
1359
|
+
this.bkdView.config.arConfig.arMode = com.barkoder.enums.BarkoderARMode.NonInteractive;
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1294
1362
|
|
|
1363
|
+
getBarkoderARMode(): any {
|
|
1364
|
+
return this.bkdView.config.arConfig.arMode
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
setBarkoderARLocationType(locationType: BarkoderConstants.BarkoderARLocationType): void {
|
|
1368
|
+
if (locationType == BarkoderConstants.BarkoderARLocationType.NONE) {
|
|
1369
|
+
this.bkdView.config.arConfig.locationType = com.barkoder.enums.BarkoderARLocationType.NONE;
|
|
1370
|
+
} else if (locationType == BarkoderConstants.BarkoderARLocationType.TIGHT) {
|
|
1371
|
+
this.bkdView.config.arConfig.locationType = com.barkoder.enums.BarkoderARLocationType.TIGHT;
|
|
1372
|
+
} else if (locationType == BarkoderConstants.BarkoderARLocationType.BOUNDINGBOX) {
|
|
1373
|
+
this.bkdView.config.arConfig.locationType = com.barkoder.enums.BarkoderARLocationType.BOUNDINGBOX;
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
getBarkoderARLocationType() : any {
|
|
1378
|
+
return this.bkdView.config.arConfig.locationType
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
setBarkoderARHeaderShowMode(headerShowMode: BarkoderConstants.BarkoderARHeaderShowMode): void {
|
|
1382
|
+
if (headerShowMode == BarkoderConstants.BarkoderARHeaderShowMode.NEVER) {
|
|
1383
|
+
this.bkdView.config.arConfig.headerShowMode = com.barkoder.enums.BarkoderARHeaderShowMode.NEVER;
|
|
1384
|
+
} else if (headerShowMode == BarkoderConstants.BarkoderARHeaderShowMode.ONSELECTED) {
|
|
1385
|
+
this.bkdView.config.arConfig.headerShowMode = com.barkoder.enums.BarkoderARHeaderShowMode.ONSELECTED;
|
|
1386
|
+
} else if (headerShowMode == BarkoderConstants.BarkoderARHeaderShowMode.ALWAYS) {
|
|
1387
|
+
this.bkdView.config.arConfig.headerShowMode = com.barkoder.enums.BarkoderARHeaderShowMode.ALWAYS;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
getBarkoderARHeaderShowMode() : any {
|
|
1392
|
+
return this.bkdView.config.arConfig.headerShowMode
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
setBarkoderARoverlayRefresh(overlayRefresh: BarkoderConstants.BarkoderAROverlayRefresh): void {
|
|
1396
|
+
if (overlayRefresh == BarkoderConstants.BarkoderAROverlayRefresh.SMOOTH) {
|
|
1397
|
+
this.bkdView.config.arConfig.overlayRefresh = com.barkoder.enums.BarkoderAROverlayRefresh.SMOOTH;
|
|
1398
|
+
} else if (overlayRefresh == BarkoderConstants.BarkoderAROverlayRefresh.NORMAL) {
|
|
1399
|
+
this.bkdView.config.arConfig.overlayRefresh = com.barkoder.enums.BarkoderAROverlayRefresh.NORMAL;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
getBarkoderARoverlayRefresh() : any {
|
|
1404
|
+
return this.bkdView.config.arConfig.overlayRefresh
|
|
1405
|
+
}
|
|
1295
1406
|
|
|
1407
|
+
setARNonSelectedLocationLineColor(locationLineColor: string): void {
|
|
1408
|
+
const locationColor = this.hexToAndroidColor(locationLineColor);
|
|
1409
|
+
this.bkdView.config.arConfig.setNonSelectedLocationColor(locationColor);
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
getARNonSelectedLocationLineColor() : any {
|
|
1413
|
+
return this.bkdView.config.arConfig.getNonSelectedLocationColor();
|
|
1414
|
+
}
|
|
1296
1415
|
|
|
1416
|
+
setARSelectedLocationLineColor(locationLineColor: string): void {
|
|
1417
|
+
const locationColor = this.hexToAndroidColor(locationLineColor);
|
|
1418
|
+
this.bkdView.config.arConfig.setSelectedLocationColor(locationColor);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
getARSelectedLocationLineColor(): any {
|
|
1422
|
+
return this.bkdView.config.arConfig.getSelectedLocationColor();
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
setARHeaderMaxTextHeight(maxText : number) : void {
|
|
1426
|
+
this.bkdView.config.arConfig.setHeaderMaxTextHeight(maxText)
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
getARHeaderMaxTextHeight() : any {
|
|
1430
|
+
return this.bkdView.config.arConfig.getHeaderMaxTextHeight()
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
setARHeaderMinTextHeight(maxText: number): void {
|
|
1434
|
+
this.bkdView.config.arConfig.setHeaderMinTextHeight(maxText)
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
getARHeaderMinTextHeight(): any {
|
|
1438
|
+
return this.bkdView.config.arConfig.getHeaderMinTextHeight()
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
setARHeaderHeight(height: number) : void {
|
|
1442
|
+
this.bkdView.config.arConfig.setHeaderHeight(height)
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
getARHeaderHeight(): any {
|
|
1446
|
+
return this.bkdView.config.arConfig.getHeaderHeight()
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
setARHeaderVerticalTextMargin(margin : number) : void {
|
|
1450
|
+
this.bkdView.config.arConfig.setHeaderVerticalTextMargin(margin)
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
getARHeaderVerticalTextMargin(): void {
|
|
1454
|
+
return this.bkdView.config.arConfig.getHeaderVerticalTextMargin()
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
setARHeaderHorizontalTextMargin(margin: number): void {
|
|
1458
|
+
this.bkdView.config.arConfig.setHeaderHorizontalTextMargin(margin)
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
getARHeaderHorizontalTextMargin(): void {
|
|
1462
|
+
return this.bkdView.config.arConfig.getHeaderHorizontalTextMargin()
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
setARNonSelectedHeaderTextColor(locationLineColor: string): void {
|
|
1466
|
+
const locationColor = this.hexToAndroidColor(locationLineColor);
|
|
1467
|
+
this.bkdView.config.arConfig.setHeaderTextColorNonSelected(locationColor);
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
getARNonSelectedHeaderTextColor() : any {
|
|
1471
|
+
return this.bkdView.config.arConfig.getHeaderTextColorNonSelected()
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
setARSelectedHeaderTextColor(locationLineColor: string): void {
|
|
1475
|
+
const locationColor = this.hexToAndroidColor(locationLineColor);
|
|
1476
|
+
this.bkdView.config.arConfig.setHeaderTextColorSelected(locationColor);
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
getARSelectedHeaderTextColor(): any {
|
|
1480
|
+
return this.bkdView.config.arConfig.getHeaderTextColorSelected()
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
setARDoubleTapToFreezeEnabled(enabled : boolean) : void {
|
|
1484
|
+
this.bkdView.config.arConfig.setDoubleTapToFreezeEnabled(enabled);
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
getARDoubleTapToFreezeEnabled(): any {
|
|
1488
|
+
return this.bkdView.config.arConfig.isDoubleTapToFreezeEnabled();
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
setResultDisappearanceDelayMs(ms : number) : void {
|
|
1492
|
+
this.bkdView.config.arConfig.setResultDisappearanceDelayMs(ms);
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
getResultDisappearanceDelayMs(): any {
|
|
1496
|
+
return this.bkdView.config.arConfig.getResultDisappearanceDelayMs();
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
setARLocationTransitionSpeed(speed : number) : void {
|
|
1500
|
+
this.bkdView.config.arConfig.setLocationTransitionSpeed(speed);
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
getARLocationTransitionSpeed(): any {
|
|
1504
|
+
return this.bkdView.config.arConfig.getLocationTransitionSpeed();
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
setARSelectedLocationLineWidth(width : number) : void {
|
|
1508
|
+
this.bkdView.config.arConfig.setSelectedLocationLineWidth(width);
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
getARSelectedLocationLineWidth(): any {
|
|
1512
|
+
return this.bkdView.config.arConfig.getSelectedLocationLineWidth();
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
setARNonSelectedLocationLineWidth(width: number): void {
|
|
1516
|
+
this.bkdView.config.arConfig.setNonSelectedLocationLineWidth(width);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
getARNonSelectedLocationLineWidth(): any {
|
|
1520
|
+
return this.bkdView.config.arConfig.getNonSelectedLocationLineWidth();
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
setARHeaderTextFormat(format : string) : void {
|
|
1524
|
+
this.bkdView.config.arConfig.setHeaderTextFormat(format);
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
getARHeaderTextFormat(format: string): void {
|
|
1528
|
+
return this.bkdView.config.arConfig.getHeaderTextFormat(format);
|
|
1529
|
+
}
|
|
1297
1530
|
setLicenseKey(licenseKey: string): void {
|
|
1298
1531
|
this.bkdView.config = new com.barkoder.BarkoderConfig(
|
|
1299
1532
|
context,
|
|
@@ -1338,3 +1571,8 @@ export class BarkoderViewAndroid extends View {
|
|
|
1338
1571
|
}
|
|
1339
1572
|
}
|
|
1340
1573
|
}
|
|
1574
|
+
function bitmapToImageSource(bitmap: android.graphics.Bitmap): ImageSource {
|
|
1575
|
+
const imageSource = new ImageSource();
|
|
1576
|
+
imageSource.setNativeSource(bitmap); // This is the key method
|
|
1577
|
+
return imageSource;
|
|
1578
|
+
}
|
|
@@ -59,7 +59,8 @@ export enum DecoderType {
|
|
|
59
59
|
AustralianPost = 35,
|
|
60
60
|
RoyalMail = 36,
|
|
61
61
|
KIX = 37,
|
|
62
|
-
JapanesePost = 38
|
|
62
|
+
JapanesePost = 38,
|
|
63
|
+
MaxiCode = 39
|
|
63
64
|
|
|
64
65
|
}
|
|
65
66
|
|
|
@@ -73,7 +74,8 @@ export enum FormattingType {
|
|
|
73
74
|
export enum DecodingSpeed {
|
|
74
75
|
Fast = 0,
|
|
75
76
|
Normal = 1,
|
|
76
|
-
Slow = 2
|
|
77
|
+
Slow = 2,
|
|
78
|
+
Rigorous = 3
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
export enum BarkoderResolution {
|
|
@@ -109,6 +111,30 @@ export enum Code39ChecksumType {
|
|
|
109
111
|
Front = 1
|
|
110
112
|
}
|
|
111
113
|
|
|
114
|
+
export enum BarkoderARMode {
|
|
115
|
+
OFF = 0,
|
|
116
|
+
InteractiveDisabled = 1,
|
|
117
|
+
InteractiveEnabled = 2,
|
|
118
|
+
NonInteractive = 3
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export enum BarkoderARHeaderShowMode {
|
|
122
|
+
NEVER = 0,
|
|
123
|
+
ALWAYS = 1,
|
|
124
|
+
ONSELECTED = 2
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export enum BarkoderARLocationType {
|
|
128
|
+
NONE = 0,
|
|
129
|
+
TIGHT = 1,
|
|
130
|
+
BOUNDINGBOX = 2
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export enum BarkoderAROverlayRefresh {
|
|
134
|
+
SMOOTH = 0,
|
|
135
|
+
NORMAL = 1
|
|
136
|
+
}
|
|
137
|
+
|
|
112
138
|
export class Common extends Observable {
|
|
113
139
|
|
|
114
140
|
}
|
|
@@ -211,6 +237,7 @@ export class DekoderConfig {
|
|
|
211
237
|
royalMail?: BarcodeConfig;
|
|
212
238
|
kix?: BarcodeConfig;
|
|
213
239
|
japanasePost?: BarcodeConfig;
|
|
240
|
+
maxicode?: BarcodeConfig;
|
|
214
241
|
general?: GeneralSettings;
|
|
215
242
|
|
|
216
243
|
constructor(config: Partial<DekoderConfig>) {
|
|
@@ -258,6 +285,7 @@ export class DekoderConfig {
|
|
|
258
285
|
'Royal Mail': this.royalMail?.toMap(),
|
|
259
286
|
'KIX': this.kix?.toMap(),
|
|
260
287
|
'Japanase Post': this.japanasePost?.toMap(),
|
|
288
|
+
'MaxiCode': this.maxicode?.toMap(),
|
|
261
289
|
'general': this.general?.toMap()
|
|
262
290
|
}
|
|
263
291
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BarkoderConstants } from "./barkoder-nativescript.common";
|
|
2
2
|
import { View } from "@nativescript/core";
|
|
3
3
|
import { ios } from "@nativescript/core/application";
|
|
4
|
+
import { ImageSource } from '@nativescript/core';
|
|
4
5
|
|
|
5
6
|
export class BarkoderViewIOS extends View {
|
|
6
7
|
public bkdView: any;
|
|
@@ -22,6 +23,14 @@ export class BarkoderViewIOS extends View {
|
|
|
22
23
|
this.bkdView.startScanningError(resultDelegate);
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
freezeScanning() {
|
|
27
|
+
this.bkdView.freezeScanning()
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
unfreezeScanning() {
|
|
31
|
+
this.bkdView.unfreezeScanning()
|
|
32
|
+
}
|
|
33
|
+
|
|
25
34
|
scanImage(base64Image: string, callback: BarkoderConstants.BarkoderResultCallback): void {
|
|
26
35
|
|
|
27
36
|
// Convert Base64 to UIImage
|
|
@@ -434,6 +443,8 @@ export class BarkoderViewIOS extends View {
|
|
|
434
443
|
this.bkdView.config.decoderConfig.decodingSpeed = 1;
|
|
435
444
|
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Slow) {
|
|
436
445
|
this.bkdView.config.decoderConfig.decodingSpeed = 2;
|
|
446
|
+
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Rigorous) {
|
|
447
|
+
this.bkdView.config.decoderConfig.decodingSpeed = 3;
|
|
437
448
|
}
|
|
438
449
|
}
|
|
439
450
|
|
|
@@ -600,6 +611,8 @@ export class BarkoderViewIOS extends View {
|
|
|
600
611
|
return this.bkdView.config.decoderConfig.kix.enabled;
|
|
601
612
|
case BarkoderConstants.DecoderType.JapanesePost:
|
|
602
613
|
return this.bkdView.config.decoderConfig.japanasePost.enabled;
|
|
614
|
+
case BarkoderConstants.DecoderType.MaxiCode:
|
|
615
|
+
return this.bkdView.config.decoderConfig.maxiCode.enabled;
|
|
603
616
|
}
|
|
604
617
|
}
|
|
605
618
|
|
|
@@ -646,6 +659,7 @@ export class BarkoderViewIOS extends View {
|
|
|
646
659
|
this.bkdView.config.decoderConfig.royalMail.enabled = false;
|
|
647
660
|
this.bkdView.config.decoderConfig.kix.enabled = false;
|
|
648
661
|
this.bkdView.config.decoderConfig.japanesePost.enabled = false;
|
|
662
|
+
this.bkdView.config.decoderConfig.maxiCode.enabled = false;
|
|
649
663
|
decoders.forEach((dt: BarkoderConstants.DecoderType) => {
|
|
650
664
|
switch (dt) {
|
|
651
665
|
case BarkoderConstants.DecoderType.Aztec:
|
|
@@ -762,6 +776,9 @@ export class BarkoderViewIOS extends View {
|
|
|
762
776
|
case BarkoderConstants.DecoderType.JapanesePost:
|
|
763
777
|
this.bkdView.config.decoderConfig.japanesePost.enabled = true;
|
|
764
778
|
break;
|
|
779
|
+
case BarkoderConstants.DecoderType.MaxiCode:
|
|
780
|
+
this.bkdView.config.decoderConfig.maxiCode.enabled = true;
|
|
781
|
+
break;
|
|
765
782
|
default:
|
|
766
783
|
break;
|
|
767
784
|
}
|
|
@@ -1133,6 +1150,26 @@ export class BarkoderViewIOS extends View {
|
|
|
1133
1150
|
return this.bkdView.config.decoderConfig.maximumResultsCount;
|
|
1134
1151
|
}
|
|
1135
1152
|
|
|
1153
|
+
setARImageResultEnabled(enabled: boolean): void {
|
|
1154
|
+
this.bkdView.config.arConfig.imageResultEnabled = enabled
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
setARBarcodeThumbnailOnResultEnabled(enabled: boolean): void {
|
|
1158
|
+
this.bkdView.config.arConfig.barcodeThumbnailOnResult = enabled
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
isARImageResultEnabled(): any {
|
|
1162
|
+
return this.bkdView.config.arConfig.imageResultEnabled
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
isARBarcodeThumbnailOnResultEnabled(): any {
|
|
1166
|
+
return this.bkdView.config.arConfig.barcodeThumbnailOnResult
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
getCurrentZoomFactor(): any {
|
|
1170
|
+
return this.bkdView.getCurrentZoomFactor()
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1136
1173
|
/**
|
|
1137
1174
|
* Sets whether the deblurring feature for UPC/EAN barcodes is enabled
|
|
1138
1175
|
*/
|
|
@@ -1303,6 +1340,186 @@ export class BarkoderViewIOS extends View {
|
|
|
1303
1340
|
}
|
|
1304
1341
|
}
|
|
1305
1342
|
|
|
1343
|
+
setBarkoderARMode(arMode: BarkoderConstants.BarkoderARMode): void {
|
|
1344
|
+
if (arMode == BarkoderConstants.BarkoderARMode.OFF) {
|
|
1345
|
+
this.bkdView.config.arConfig.arMode = 0
|
|
1346
|
+
} else if (arMode == BarkoderConstants.BarkoderARMode.InteractiveDisabled) {
|
|
1347
|
+
this.bkdView.config.arConfig.arMode = 1
|
|
1348
|
+
} else if (arMode == BarkoderConstants.BarkoderARMode.InteractiveEnabled) {
|
|
1349
|
+
this.bkdView.config.arConfig.arMode = 2
|
|
1350
|
+
} else if (arMode == BarkoderConstants.BarkoderARMode.NonInteractive) {
|
|
1351
|
+
this.bkdView.config.arConfig.arMode = 3
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
getBarkoderARMode(): any {
|
|
1356
|
+
return this.bkdView.config.arConfig.arMode
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
setBarkoderARLocationType(locationType: BarkoderConstants.BarkoderARLocationType): void {
|
|
1360
|
+
if (locationType == BarkoderConstants.BarkoderARLocationType.NONE) {
|
|
1361
|
+
this.bkdView.config.arConfig.locationType = 0
|
|
1362
|
+
} else if (locationType == BarkoderConstants.BarkoderARLocationType.TIGHT) {
|
|
1363
|
+
this.bkdView.config.arConfig.locationType = 1
|
|
1364
|
+
} else if (locationType == BarkoderConstants.BarkoderARLocationType.BOUNDINGBOX) {
|
|
1365
|
+
this.bkdView.config.arConfig.locationType = 2
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
getBarkoderARLocationType() : any {
|
|
1370
|
+
return this.bkdView.config.arConfig.locationType
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
setBarkoderARHeaderShowMode(headerShowMode: BarkoderConstants.BarkoderARHeaderShowMode): void {
|
|
1374
|
+
if (headerShowMode == BarkoderConstants.BarkoderARHeaderShowMode.NEVER) {
|
|
1375
|
+
this.bkdView.config.arConfig.headerShowMode = 0
|
|
1376
|
+
} else if (headerShowMode == BarkoderConstants.BarkoderARHeaderShowMode.ALWAYS) {
|
|
1377
|
+
this.bkdView.config.arConfig.headerShowMode = 1
|
|
1378
|
+
} else if (headerShowMode == BarkoderConstants.BarkoderARHeaderShowMode.ONSELECTED) {
|
|
1379
|
+
this.bkdView.config.arConfig.headerShowMode = 2
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
getBarkoderARHeaderShowMode() : any {
|
|
1384
|
+
return this.bkdView.config.arConfig.headerShowMode
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
setBarkoderARoverlayRefresh(overlayRefresh: BarkoderConstants.BarkoderAROverlayRefresh): void {
|
|
1388
|
+
if (overlayRefresh == BarkoderConstants.BarkoderAROverlayRefresh.SMOOTH) {
|
|
1389
|
+
this.bkdView.config.arConfig.overlayRefresh = 1;
|
|
1390
|
+
} else if (overlayRefresh == BarkoderConstants.BarkoderAROverlayRefresh.NORMAL) {
|
|
1391
|
+
this.bkdView.config.arConfig.overlayRefresh = 2;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
getBarkoderARoverlayRefresh() : any {
|
|
1396
|
+
return this.bkdView.config.arConfig.overlayRefresh
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
setARNonSelectedLocationLineColor(locationLineColor: string): void {
|
|
1400
|
+
const locationColor = this.hexToUIColor(locationLineColor);
|
|
1401
|
+
this.bkdView.config.arConfig.nonSelectedLocationColor = locationColor;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
getARNonSelectedLocationLineColor() : any {
|
|
1405
|
+
return this.bkdView.config.arConfig.nonSelectedLocationColor;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
setARSelectedLocationLineColor(locationLineColor: string): void {
|
|
1409
|
+
const locationColor = this.hexToUIColor(locationLineColor);
|
|
1410
|
+
this.bkdView.config.arConfig.selectedLocationColor = locationColor;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
getARSelectedLocationLineColor(): any {
|
|
1414
|
+
return this.bkdView.config.arConfig.selectedLocationColor;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
setARHeaderMaxTextHeight(maxText : number) : void {
|
|
1418
|
+
this.bkdView.config.arConfig.headerMaxTextHeight = maxText;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
getARHeaderMaxTextHeight() : any {
|
|
1422
|
+
return this.bkdView.config.arConfig.headerMaxTextHeight
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
setARHeaderMinTextHeight(minText: number): void {
|
|
1426
|
+
this.bkdView.config.arConfig.headerMinTextHeight = minText;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
getARHeaderMinTextHeight(): any {
|
|
1430
|
+
return this.bkdView.config.arConfig.headerMinTextHeight
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
setARHeaderHeight(height: number) : void {
|
|
1434
|
+
this.bkdView.config.arConfig.headerHeight = height
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
getARHeaderHeight(): any {
|
|
1438
|
+
return this.bkdView.config.arConfig.headerHeight
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
setARHeaderVerticalTextMargin(margin : number) : void {
|
|
1442
|
+
this.bkdView.config.arConfig.headerVerticalTextMargin = margin
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
getARHeaderVerticalTextMargin(): void {
|
|
1446
|
+
return this.bkdView.config.arConfig.headerVerticalTextMargin
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
setARHeaderHorizontalTextMargin(margin: number): void {
|
|
1450
|
+
this.bkdView.config.arConfig.headerHorizontalTextMargin = margin
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
getARHeaderHorizontalTextMargin(): void {
|
|
1454
|
+
return this.bkdView.config.arConfig.headerHorizontalTextMargin
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
setARNonSelectedHeaderTextColor(locationLineColor: string): void {
|
|
1458
|
+
const locationColor = this.hexToUIColor(locationLineColor);
|
|
1459
|
+
this.bkdView.config.arConfig.headerTextColorNonSelected = locationColor;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
getARNonSelectedHeaderTextColor() : any {
|
|
1463
|
+
return this.bkdView.config.arConfig.headerTextColorNonSelected
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
setARSelectedHeaderTextColor(locationLineColor: string): void {
|
|
1467
|
+
const locationColor = this.hexToUIColor(locationLineColor);
|
|
1468
|
+
this.bkdView.config.arConfig.headerTextColorSelected = locationColor
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
getARSelectedHeaderTextColor(): any {
|
|
1472
|
+
return this.bkdView.config.arConfig.headerTextColorSelected
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
setARDoubleTapToFreezeEnabled(enabled : boolean) : void {
|
|
1476
|
+
this.bkdView.config.arConfig.doubleTapToFreezeEnabled = enabled
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
getARDoubleTapToFreezeEnabled(): any {
|
|
1480
|
+
return this.bkdView.config.arConfig.doubleTapToFreezeEnabled
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
setResultDisappearanceDelayMs(ms : number) : void {
|
|
1484
|
+
this.bkdView.config.arConfig.resultDisappearanceDelayMs = ms
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
getResultDisappearanceDelayMs(): any {
|
|
1488
|
+
return this.bkdView.config.arConfig.resultDisappearanceDelayMs
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
setARLocationTransitionSpeed(speed : number) : void {
|
|
1492
|
+
this.bkdView.config.arConfig.locationTransitionSpeed = speed
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
getARLocationTransitionSpeed(): any {
|
|
1496
|
+
return this.bkdView.config.arConfig.locationTransitionSpeed
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
setARSelectedLocationLineWidth(width : number) : void {
|
|
1500
|
+
this.bkdView.config.arConfig.selectedLocationLineWidth = width
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
getARSelectedLocationLineWidth(): any {
|
|
1504
|
+
return this.bkdView.config.arConfig.selectedLocationLineWidth
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
setARNonSelectedLocationLineWidth(width: number): void {
|
|
1508
|
+
this.bkdView.config.arConfig.nonSelectedLocationLineWidth = width
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
getARNonSelectedLocationLineWidth(): any {
|
|
1512
|
+
return this.bkdView.config.arConfig.nonSelectedLocationLineWidth
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
setARHeaderTextFormat(format : string) : void {
|
|
1516
|
+
this.bkdView.config.arConfig.headerTextFormat = format
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
getARHeaderTextFormat(format: string): void {
|
|
1520
|
+
return this.bkdView.config.arConfig.headerTextFormat
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1306
1523
|
|
|
1307
1524
|
/**
|
|
1308
1525
|
* Configures the Barkoder functionality based on the provided configuration
|
|
@@ -1356,10 +1573,42 @@ export class BarkoderViewWraper extends UIResponder
|
|
|
1356
1573
|
|
|
1357
1574
|
scanningFinishedThumbnailsImage(
|
|
1358
1575
|
decoderResults: NSArray<DecoderResult> | DecoderResult[],
|
|
1359
|
-
thumbnails: NSArray<UIImage> | UIImage[],
|
|
1360
|
-
image: UIImage
|
|
1576
|
+
thumbnails: NSArray<UIImage> | UIImage[] | null,
|
|
1577
|
+
image: UIImage | null
|
|
1361
1578
|
): void {
|
|
1362
|
-
|
|
1579
|
+
const jsThumbnails: ImageSource[] = [];
|
|
1580
|
+
|
|
1581
|
+
// Convert thumbnails
|
|
1582
|
+
if (thumbnails instanceof NSArray) {
|
|
1583
|
+
for (let i = 0; i < thumbnails.count; i++) {
|
|
1584
|
+
const uiImage = thumbnails.objectAtIndex(i);
|
|
1585
|
+
const imgSrc = new ImageSource();
|
|
1586
|
+
imgSrc.setNativeSource(uiImage);
|
|
1587
|
+
jsThumbnails.push(imgSrc);
|
|
1588
|
+
}
|
|
1589
|
+
} else if (Array.isArray(thumbnails)) {
|
|
1590
|
+
for (const uiImage of thumbnails) {
|
|
1591
|
+
const imgSrc = new ImageSource();
|
|
1592
|
+
imgSrc.setNativeSource(uiImage);
|
|
1593
|
+
jsThumbnails.push(imgSrc);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
// Convert result image to ImageSource if not null
|
|
1598
|
+
let convertedImage: ImageSource | null = null;
|
|
1599
|
+
|
|
1600
|
+
if (image) {
|
|
1601
|
+
convertedImage = new ImageSource();
|
|
1602
|
+
convertedImage.setNativeSource(image);
|
|
1603
|
+
} else if (jsThumbnails.length > 0) {
|
|
1604
|
+
console.warn('⚠️ resultImage is null, using first thumbnail as fallback.');
|
|
1605
|
+
convertedImage = jsThumbnails[0];
|
|
1606
|
+
} else {
|
|
1607
|
+
console.warn('⚠️ resultImage and thumbnails are both missing.');
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
// Call JS callback with safe image fallback
|
|
1611
|
+
this.callback.scanningFinished(decoderResults, jsThumbnails, convertedImage);
|
|
1363
1612
|
}
|
|
1364
1613
|
|
|
1365
1614
|
static new(): BarkoderViewWraper {
|
package/package.json
CHANGED
|
Binary file
|