From 569e0b0315e0c056fcd5711b743971814ad4934b Mon Sep 17 00:00:00 2001
From: Dynamsoft-Henry <78675724+Dynamsoft-Henry@users.noreply.github.com>
Date: Wed, 31 Dec 2025 16:31:18 +0800
Subject: [PATCH] Updating side list with license activation
---
.../programming-flutter.html | 1 +
.../programming-maui.html | 2 +-
.../programming-react-native.html | 1 +
programming/flutter/license-activation.md | 41 +++++++++++++
programming/maui/license-activation.md | 57 +++++++++++++++++++
programming/react-native/expo-guide.md | 23 +++-----
.../react-native/license-activation.md | 44 ++++++++++++++
7 files changed, 154 insertions(+), 15 deletions(-)
create mode 100644 programming/flutter/license-activation.md
create mode 100644 programming/maui/license-activation.md
create mode 100644 programming/react-native/license-activation.md
diff --git a/_includes/sidelist-programming/programming-flutter.html b/_includes/sidelist-programming/programming-flutter.html
index e2d3a2d3..76538a26 100644
--- a/_includes/sidelist-programming/programming-flutter.html
+++ b/_includes/sidelist-programming/programming-flutter.html
@@ -490,6 +490,7 @@
Version 11.x
+License Initialization
Choose a Language
- Android (Java & Kotlin)
diff --git a/_includes/sidelist-programming/programming-maui.html b/_includes/sidelist-programming/programming-maui.html
index 3ed9584a..7998c3e4 100644
--- a/_includes/sidelist-programming/programming-maui.html
+++ b/_includes/sidelist-programming/programming-maui.html
@@ -550,7 +550,7 @@
- 10.x
-
+License Initialization
Upgrade from 10.x to 11.x
Migrate from Xamarin Forms
diff --git a/_includes/sidelist-programming/programming-react-native.html b/_includes/sidelist-programming/programming-react-native.html
index 32560462..5f35d30e 100644
--- a/_includes/sidelist-programming/programming-react-native.html
+++ b/_includes/sidelist-programming/programming-react-native.html
@@ -532,6 +532,7 @@
Version 11.x
+License Initialization
Choose a Language
- Android (Java & Kotlin)
diff --git a/programming/flutter/license-activation.md b/programming/flutter/license-activation.md
new file mode 100644
index 00000000..08b90690
--- /dev/null
+++ b/programming/flutter/license-activation.md
@@ -0,0 +1,41 @@
+---
+layout: default-layout
+title: License Activation - Dynamsoft Barcode Reader Flutter Edition
+description: Initialize the license of Dynamsoft Barcode Reader Flutter edition.
+keywords: license initialization, licensing
+needAutoGenerateSidebar: true
+---
+
+# License Initialization
+
+## Get a trial license
+
+You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=docs&package=mobile){:target="_blank"} link.
+
+You can contact our support team via the [Contacting Us](https://www.dynamsoft.com/contact/){:target="_blank"} link when your license generation failed.
+
+## Get a Full License
+
+[Contact us](https://www.dynamsoft.com/company/contact){:target="_blank"} to purchase a full license.
+
+## Set the License In the Code
+
+### For BarcodeScanner
+
+```dart
+var config = BarcodeScannerConfig(license: "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", scanningMode: scanningMode);
+BarcodeScanResult barcodeScanResult = await BarcodeScanner.launch(config);
+```
+
+### For Foundational Barcode Reader
+
+The following shows how to set the license in the code.
+
+```dart
+LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9').then((data) {
+ final (isSuccess, message) = data;
+ if (!isSuccess) {
+ print("license error: $message");
+ }
+});
+```
diff --git a/programming/maui/license-activation.md b/programming/maui/license-activation.md
new file mode 100644
index 00000000..f4488cb9
--- /dev/null
+++ b/programming/maui/license-activation.md
@@ -0,0 +1,57 @@
+---
+layout: default-layout
+title: License Activation - Dynamsoft Barcode Reader MAUI Edition
+description: Initialize the license of Dynamsoft Barcode Reader MAUI edition.
+keywords: license initialization, licensing
+needAutoGenerateSidebar: true
+---
+
+# License Initialization
+
+## Get a trial license
+
+You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=docs&package=mobile){:target="_blank"} link.
+
+You can contact our support team via the [Contacting Us](https://www.dynamsoft.com/contact/){:target="_blank"} link when your license generation failed.
+
+## Get a Full License
+
+[Contact us](https://www.dynamsoft.com/company/contact){:target="_blank"} to purchase a full license.
+
+## Set the License In the Code
+
+### For BarcodeScanner
+
+```csharp
+var config = new BarcodeScannerConfig("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
+var result = await BarcodeScanner.Start(config);
+```
+
+### For Foundational Barcode Reader
+
+The following shows how to set the license in the code.
+
+```csharp
+public partial class CameraPage : ContentPage, ILicenseVerificationListener
+{
+ public CameraPage()
+ {
+ InitializeComponent();
+ LicenseManager.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this);
+ }
+ public void OnLicenseVerified(bool isSuccess, string message)
+ {
+ if (!isSuccess)
+ {
+ Console.WriteLine("License initialization failed: " + message);
+ }
+ }
+ public void OnFailure(int errorCode, string errorMessage)
+ {
+ MainThread.BeginInvokeOnMainThread(() =>
+ {
+ DisplayAlert("Error", errorMessage, "OK");
+ });
+ }
+}
+```
diff --git a/programming/react-native/expo-guide.md b/programming/react-native/expo-guide.md
index 409cb5fe..6cf38e73 100644
--- a/programming/react-native/expo-guide.md
+++ b/programming/react-native/expo-guide.md
@@ -57,14 +57,12 @@ LicenseManager.initLicense(License).catch(e => {
### Preparation
-1. Create a new Expo project with the following command:
+Create a new Expo project with the following command:
- ```bash
- npx create-expo-app ScanBarcodes
- cd ScanBarcodes
- ```
-
-2. Follow the [installation section](#installation) to install the dependencies and generate native projects.
+```bash
+npx create-expo-app ScanBarcodes
+cd ScanBarcodes
+```
### Installation
@@ -109,9 +107,7 @@ cd ..
### Implementing the Barcode Scanner
-New Expo projects use [Expo Router](https://docs.expo.dev/router/introduction/) with a file-based routing system. The main entry point is located in the `app` folder instead of a root `App.tsx` file.
-
-Replace the content of `app/(tabs)/index.tsx` with the following code:
+To implement the barcode scanning feature, replace the content of `app/(tabs)/index.tsx` with the following code:
```tsx
import {
@@ -125,7 +121,7 @@ import React, {useEffect, useRef} from 'react';
import {Alert, AppState, StyleSheet, View} from 'react-native';
// Initialize the license.
// The license string here is a trial license. Note that network connection is required for this license to work.
-// You can request an extension via the following link: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=react-native
+// You can request an extension via the following link: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=guide&package=react-native
const License = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
LicenseManager.initLicense(License).catch(e => {
Alert.alert('License error', e.message);
@@ -214,9 +210,8 @@ export default App;
> [!Note]
>
-> - The LICENSE string here grants a time-limited free trial which requires network connection to work.
-> - You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=guide&package=react-native){:target="_blank"} link.
-> - If you download the Installation Package, it comes with a 30-day trial license by default.
+> - The license string here is a trial license. Note that network connection is required for this license to work.
+> - You can request an extension via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=guide&package=react-native){:target="_blank"} link.
### Run the App
diff --git a/programming/react-native/license-activation.md b/programming/react-native/license-activation.md
new file mode 100644
index 00000000..5fa4ea92
--- /dev/null
+++ b/programming/react-native/license-activation.md
@@ -0,0 +1,44 @@
+---
+layout: default-layout
+title: License Activation - Dynamsoft Barcode Reader React Native Edition
+description: Initialize the license of Dynamsoft Barcode Reader React Native edition.
+keywords: license initialization, licensing
+needAutoGenerateSidebar: true
+---
+
+# License Initialization
+
+## Get a trial license
+
+You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=docs&package=mobile){:target="_blank"} link.
+
+You can contact our support team via the [Contacting Us](https://www.dynamsoft.com/contact/){:target="_blank"} link when your license generation failed.
+
+## Get a Full License
+
+[Contact us](https://www.dynamsoft.com/company/contact){:target="_blank"} to purchase a full license.
+
+## Set the License In the Code
+
+### For BarcodeScanner
+
+```js
+const LICENSE = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
+const StartScanning = (): Promise => {
+ let barcodeScanConfig = {
+ license: LICENSE
+ } as BarcodeScanConfig;
+ return BarcodeScanner.launch(barcodeScanConfig);
+};
+```
+
+### For Foundational Barcode Reader
+
+The following shows how to set the license in the code.
+
+```js
+const License = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
+LicenseManager.initLicense(License).catch(e => {
+ Alert.alert('License error', e.message);
+});
+```