Skip to content

Commit 4cd3ad6

Browse files
Merge pull request #326 from dynamsoft-docs/preview
update to internal commit 36dd4656
2 parents 615bbb3 + 9f35a49 commit 4cd3ad6

File tree

7 files changed

+526
-8
lines changed

7 files changed

+526
-8
lines changed

assets/js/dbrMobileVersionSearch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
[
2+
{
3+
"version": "10.4.3001",
4+
"matchVersion": {
5+
"android": "2.6.1003",
6+
"ios": "2.6.1003"
7+
}
8+
},
9+
{
10+
"version": "10.4.3000",
11+
"matchVersion": {
12+
"android": "2.6.1003",
13+
"ios": "2.6.1003",
14+
"maui": "2.6.1000"
15+
}
16+
},
217
{
318
"version": "10.4.2000",
419
"matchVersion": {

programming/android/user-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ needGenerateH3Content: true
88
noTitleIndex: true
99
---
1010

11-
# Android User Guide for Barcode Scanning
11+
# BarcodeScanner Android User Guide
1212

1313
This user guide will walk through the [ScanSingleBarcode](https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/android/BarcodeScannerAPISamples/ScanSingleBarcode/) sample app. When creating your own project, please use this sample as a reference. This guide uses [`BarcodeScanner`](api-reference/barcode-scanner/index.md) API which aim to elevate the UI creation process with less code and offer a more pleasant and intuitive UI for your app.
1414

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
layout: default-layout
3+
title: Migrate from Xamarin Forms to MAUI - Dynamsoft Barcode Reader for MAUI
4+
description: This is the migration guide from Xamarin Forms to MAUI
5+
keywords: user guide, maui, xamarin forms
6+
needAutoGenerateSidebar: true
7+
needGenerateH3Content: true
8+
noTitleIndex: true
9+
---
10+
11+
# How to migrate from Xamarin Forms to MAUI
12+
13+
The Dynamsoft Barcode Reader SDK has been refactored to align with the [DynamsoftCaptureVision (DCV)]({{ site.dcvb_architecture }}) architecture. To upgrade to version 10.x, we recommend following the [User Guide](user-guide.md) and re-writing your code accordingly.
14+
15+
## Update the Project
16+
17+
Previously, you created a Mobile App (Xamarin.Forms) project. Now, you’ll need to create a standalone .NET MAUI App project.
18+
19+
## Update the Library
20+
21+
In your Xamarin.Forms project, you referenced the **Dynamsoft.CaptureVision.Xamarin.Forms** library. Now, in your MAUI project, you’ll need to reference the **Dynamsoft.BarcodeReaderBundle.Maui** library. Please refer to the [User Guide](user-guide.md#installation) for further instructions.
22+
23+
## Update the License Activation Code
24+
25+
Starting from 10.0, we have unified the API for setting licenses across different Dynamsoft products.
26+
27+
| Old APIs | New APIs |
28+
| :----------- | :------- |
29+
| `BarcodeReader.initLicense` | `LicenseManager.initLicense` |
30+
31+
- code in Xamarin.Forms
32+
33+
```c#
34+
public partial class App : Application, ILicenseVerificationListener
35+
{
36+
public App(IDCVCameraEnhancer dce, IDCVBarcodeReader dbr)
37+
{
38+
...
39+
// Initialize the license of barcode reader module. Please note that the following license is a public trial.
40+
barcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this);
41+
}
42+
43+
// Implement LicenseVerificationCallback to get message from the license server.
44+
public void LicenseVerificationCallback(bool isSuccess, string msg)
45+
{
46+
if (!isSuccess)
47+
{
48+
System.Console.WriteLine(msg);
49+
}
50+
}
51+
}
52+
```
53+
54+
- code in MAUI
55+
56+
```c#
57+
public partial class MainPage : ContentPage, ILicenseVerificationListener
58+
{
59+
public MainPage()
60+
{
61+
InitializeComponent();
62+
LicenseManager.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this);
63+
}
64+
public void OnLicenseVerified(bool isSuccess, string message)
65+
{
66+
if (!isSuccess)
67+
{
68+
Debug.WriteLine(message);
69+
}
70+
}
71+
}
72+
```
73+
74+
## Update Video Streaming Decoding APIs
75+
76+
The APIs for decoding video frames has been adjusted as follows:
77+
78+
| Old APIs | New APIs |
79+
| :----------- | :------- |
80+
| `BarcodeReader.SetCameraEnhancer` | `CaptureVisionRouter.SetInput` |
81+
| `BarcodeReader.StartScanning` | `CaptureVisionRouter.StartCapturing` |
82+
| `BarcodeReader.StopScanning` | `CaptureVisionRouter.StopCapturing` |
83+
| `BarcodeReader.AddResultReceiver` | `CaptureVisionRouter.addResultReceiver` |
84+
| `BarcodeReader.Set/GetMinImageReadingInterval` | `SimplifiedCaptureVisionSettings.MinImageCaptureInterval` |
85+
| `BarcodeReader.EnableResultVerification` | `MultiFrameResultCrossFilter.EnableResultCrossVerification` |
86+
| `BarcodeReader.EnableDuplicateFilter` | `MultiFrameResultCrossFilter.EnableResultDeduplication` |
87+
| `interface IBarcodeResultListener` | `interface ICapturedResultReceiver` |
88+
| `class BarcodeResult` | `class BarcodeResultItem` |
89+
90+
## Migrate Your Templates
91+
92+
The template system is upgraded. The template you used for the previous version can't be directly recognized by the new version. Please <a href="https://download2.dynamsoft.com/dcv/TemplateConverter.zip" target="_blank">download the TemplateConverter tool</a> or <a href="https://www.dynamsoft.com/company/customer-service/#contact" target="_blank">contact us</a> to upgrade your template.
93+
94+
The template-based APIs have been updated as follows:
95+
96+
| Old APIs | New APIs |
97+
| :----------- | :------- |
98+
| `BarcodeReader.UpdateRuntimeSettings` | `CaptureVisionRouter.InitSettings` |
99+
| `BarcodeReader.ResetRuntimeSettings` | `CaptureVisionRouter.ResetRuntimeSettings` |
100+
| `BarcodeReader.OutputRuntimeSettingsToString` | `CaptureVisionRouter.OutputSettings` |
101+
102+
## Migrate Your DBRPublicRuntimeSettings
103+
104+
The class `DBRPublicRuntimeSettings` has been refactored. The APIs for accessing and updating `DBRPublicRuntimeSettings` has been adjusted as follows:
105+
106+
| Old APIs | New APIs |
107+
| :----------- | :------- |
108+
| `BarcodeReader.GetRuntimeSettings` | `CaptureVisionRouter.GetSimplifiedSettings` |
109+
| `BarcodeReader.UpdateRuntimeSettings` | `CaptureVisionRouter.UpdateSettings` |
110+
111+
### Migrate to SimplifiedCaptureVisionSettings
112+
113+
The following properties are replaced by similar properties under `SimplifiedCaptureVisionSettings`. They can also be set via a template file(String).
114+
115+
| PublicRuntimeSettings Property | SimplifiedCaptureVisionSettings Property | Template File Parameter |
116+
| ------------------------------- | ----------------------------------------- | ----------------------- |
117+
| `Timeout` | [`Timeout`]({{ site.dcv_maui_api }}capture-vision-router/auxiliary-classes/simplified-capture-vision-settings.html#timeout) | [`CaptureVisionTemplates.Timeout`]({{ site.dcvb_parameters_reference }}capture-vision-template/timeout.html?product=dbr) |
118+
119+
### Migrate to SimplifiedBarcodeReaderSettings
120+
121+
The following properties are replaced by similar properties under `SimplifiedBarcodeReaderSettings`. The majority of them can also be set via a template file(String).
122+
123+
| PublicRuntimeSettings Property | SimplifiedBarcodeReaderSettings Property | Template File Parameter |
124+
| ------------------------------- | ----------------------------------------- | ----------------------- |
125+
| `MinBarcodeTextLength` | [`MinBarcodeTextLength`]({{ site.dbr_maui_api }}simplified-barcode-reader-settings.html#minbarcodetextlength) | [`BarcodeFormatSpecification.BarcodeTextLengthRangeArray`]({{ site.dcvb_parameters_reference }}barcode-format-specification/barcode-text-length-range-array.html?product=dbr) |
126+
| `MinResultConfidence` | [`MinResultConfidence`]({{ site.dbr_maui_api }}simplified-barcode-reader-settings.html#minresultconfidence) | [`BarcodeFormatSpecification.MinResultConfidence`]({{ site.dcvb_parameters_reference }}barcode-format-specification/min-result-confidence.html?product=dbr) |
127+
| `ExpectedBarcodesCount` | [`ExpectedBarcodesCount`]({{ site.dbr_maui_api }}simplified-barcode-reader-settings.html#expectedbarcodescount) | [`BarcodeReaderTaskSetting.ExpectedBarcodesCount`]({{ site.dcvb_parameters_reference }}barcode-reader-task-settings/expected-barcodes-count.html?product=dbr) |
128+
| `BarcodeFormatIds` | [`BarcodeFormatIds`]({{ site.dbr_maui_api }}simplified-barcode-reader-settings.html#barcodeformatids) | [`BarcodeReaderTaskSetting.BarcodeFormatIds`]({{ site.dcvb_parameters_reference }}barcode-reader-task-settings/barcode-format-ids.html?product=dbr) |
129+
| `BarcodeFormatIds_2` | [`BarcodeFormatIds`]({{ site.dbr_maui_api }}simplified-barcode-reader-settings.html#barcodeformatids) | [`BarcodeReaderTaskSetting.BarcodeFormatIds`]({{ site.dcvb_parameters_reference }}barcode-reader-task-settings/barcode-format-ids.html?product=dbr) |
130+
131+
> Remarks:
132+
>
133+
> * The 2 groups of barcode formats are merged.

programming/maui/migrate-from-xamarin-to-maui.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ noTitleIndex: true
1010

1111
# How to migrate from Xamarin Forms to MAUI
1212

13-
The Dynamsoft Barcode Reader SDK has been refactored to align with the [DynamsoftCaptureVision (DCV)]({{ site.dcvb_architecture }}) architecture. To upgrade to version 10.x, we recommend following the [User Guide](user-guide.md) and re-writing your code accordingly.
13+
Xamarin.Forms platform is no longer supported since DCV 2.x, you can update to MAUI instead. To upgrade to DCV MAUI v2.x, we recommend following the [User Guide](user-guide.md) and re-writing your code accordingly.
1414

1515
## Update the Project
1616

1717
Previously, you created a Mobile App (Xamarin.Forms) project. Now, you’ll need to create a standalone .NET MAUI App project.
1818

1919
## Update the Library
2020

21-
In your Xamarin.Forms project, you referenced the **Dynamsoft.CaptureVision.Xamarin.Forms** library. Now, in your MAUI project, you’ll need to reference the **Dynamsoft.BarcodeReaderBundle.Maui** library. Please refer to the [User Guide](user-guide.md#installation) for further instructions.
21+
In your Xamarin.Forms project, you referenced the **Dynamsoft.CaptureVision.Xamarin.Forms** library. Now, in your MAUI project, you’ll need to reference the **Dynamsoft.CaptureVisionBundle.Maui** library. Please refer to the [User Guide](user-guide.md#installation) for further instructions.
2222

2323
## Update the License Activation Code
2424

25-
Starting from 10.0, we have unified the API for setting licenses across different Dynamsoft products.
25+
Starting from 2.4.2000, we have unified the API for setting licenses across different Dynamsoft products.
2626

2727
| Old APIs | New APIs |
2828
| :----------- | :------- |

0 commit comments

Comments
 (0)