From ea35c99abb0f0b39303c9c519f12a3ec16b425b8 Mon Sep 17 00:00:00 2001
From: Dynamsoft-Henry <78675724+Dynamsoft-Henry@users.noreply.github.com>
Date: Thu, 11 Dec 2025 14:11:26 +0800
Subject: [PATCH 1/2] Updating guides
---
programming/android/user-guide.md | 2 +-
.../flutter/driver-license-user-guide.md | 147 +++++++--------
.../flutter/foundational-user-guide.md | 171 ++++++++----------
programming/flutter/user-guide.md | 72 +++-----
programming/react-native/user-guide.md | 2 +-
5 files changed, 175 insertions(+), 219 deletions(-)
diff --git a/programming/android/user-guide.md b/programming/android/user-guide.md
index 91ea9194..b5e2db91 100644
--- a/programming/android/user-guide.md
+++ b/programming/android/user-guide.md
@@ -244,7 +244,7 @@ class MainActivity : AppCompatActivity() {
> [!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=ios){:target="_blank"} link.
+> - 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=android){:target="_blank"} link.
> - If you download the Installation Package, it comes with a 30-day trial license by default.
### Step 5: Implementing the Barcode Scanner
diff --git a/programming/flutter/driver-license-user-guide.md b/programming/flutter/driver-license-user-guide.md
index e7826852..de09edbc 100644
--- a/programming/flutter/driver-license-user-guide.md
+++ b/programming/flutter/driver-license-user-guide.md
@@ -10,24 +10,20 @@ noTitleIndex: true
# Driver License Scanner Integration Guide
-This guide will focus on the specific use case of scanning driver licenses to quickly retrieve one's ID info. Similar to the [Foundational Integration Guide](foundational-user-guide.md), this guide will utilize the [`Capture Vision Foundational API`]({{ site.dcv_flutter_api }}) to get the driver license scanner up and running.
-
-> [!NOTE]
-> The Driver License Scanner is composed of two foundational Dynamsoft products - the [Dynamsoft Barcode Reader](https://www.dynamsoft.com/barcode-reader/sdk-mobile/) and the Dynamsoft Code Parser. The Barcode Reader is responsible for capturing and decoding the PDF417 barcodes of the driver licenses. Afterwards, the barcode result needs to be parsed into human-readable fields, which is where the Code Parser comes into play.
+This guide walks you through integrating a Driver License Scanner to quickly extract ID information from driver licenses.
## Supported Driver License Types
-Driver licenses come with a PDF417 barcode (usually on the back) that encodes the holder's information. These driver licenses can come in different formats, which means different ways that the information is encoded into the barcode, or even the type of information that is encoded.
+Most driver licenses include a PDF417 barcode (usually on the back) that encodes personal information. Different regions use different formats, meaning the contained fields and encoding structure can vary.
### AAMVA Driver License
-AAMVA - the American Association of Motor Vehicle Administrators - defines the standard that the majority of North American driver licenses need to adhere to. You can learn more about AAMVA on their [website](https://www.aamva.org/).
-
-All versions of the AAMVA DL/ID specification (2000, 2003, 2005, 2009, 2010, 2011, 2012, 2013, 2016) are supported by the Dynamsoft Barcode Reader.
+The American Association of Motor Vehicle Administrators (AAMVA) defines the standard used across most North American driver licenses.
+All AAMVA DL/ID specification versions (2000–2016) are supported.
### South Africa Driver License
-Support for South African driver licenses is limited - which means that the library is able to extract only a portion of the personal info that is encoded onto the driver license. Parsing of the full info from the driver license will come in a future version of the library.
+South African driver license barcodes are partially supported. [View supported fields]({{ site.code_types }}za-dl.html).
## System Requirements
@@ -41,56 +37,29 @@ Support for South African driver licenses is limited - which means that the libr
* Supported ABI: arm64 and x86_64
* Development Environment: Xcode 13+ (Xcode 14.1+ recommended)
-> [!TIP]
-> If you are downloading Xcode or Android Studio for the first time, please remember to also install the command-line tools.
-
-> [!NOTE]
-> Please note that the sample projects that we offer were last tested with Flutter 3.35.7
-
-## Including the Library
+## Adding the Library
-Run the following command in the root directory of your flutter project to add `dynamsoft_barcode_reader_bundle_flutter` to the dependencies:
+Run the following in your project root:
```bash
flutter pub add dynamsoft_barcode_reader_bundle_flutter
-```
-
-Then run the following command to install all the dependencies:
-
-```bash
flutter pub get
```
> [!NOTE]
-> Including the `dynamsoft_barcode_reader_bundle_flutter` library will also include the `dynamsoft_capture_vision_flutter` library, which will be the one that is actually imported and used.
+> Adding `dynamsoft_barcode_reader_bundle_flutter` automatically includes `dynamsoft_capture_vision_flutter`, which is the library you'll interact with directly.
## Building the Driver License Scanner Widget
-Now that the package is added, it's time to start building the Driver License Scanner widget. Unlike the default implementation of the Barcode Reader that is explored in the other guides, building the driver license scanner requires a few more steps and classes to be implemented to fully represent the parsed result that is produced by the library.
-
-These steps include importing the library, implementing the scanner page, creating the *DriverLicenseScanResult* class, and then putting them all together in `main.dart`.
-
-### Importing the Library
-
-To use the Capture Vision API, please import `dynamsoft_capture_vision_flutter` into the three files that we will be implementing (`main.dart`/`scan_page.dart`/`driver_license_scan_result.dart`):
+The driver license workflow includes:
-```dart
-import 'package:dynamsoft_capture_vision_flutter/dynamsoft_capture_vision_flutter.dart';
-```
+- Implementing the scan page
+- Defining the result extraction APIs (e.g., `DriverLicenseScanResult`, `DriverLicenseData`)
+- Invoking the scanner from main.dart
### Create the Scan Page
-Let's tackle the first and main component, the `ScannerPage` class which will be implemented in `scan_page.dart`. In order to implement the full driver license scanner workflow, the following needs to be done in order:
-
-- Define a valid license via the [`LicenseManager`]({{ site.dcv_flutter_api }}license/license-manager.html)
-- Initialize the [`CameraEnhancer`]({{ site.dce_flutter_api }}camera-enhancer.html) object
-- Initialize the [`CaptureVisionRouter`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html) object
-- Bind the `CameraEnhancer` object to the `CaptureVisionRouter` object
-- Register a [`CapturedResultReceiver`]({{ site.dcv_flutter_api }}capture-vision-router/captured-result-receiver.html) object to listen for parsed driver license barcode results via the callback function [`onParsedResultsReceived`]({{ site.dcv_flutter_api }}capture-vision-router/captured-result-receiver.html#onparsedresultsreceived)
-- Open the camera
-- Start scanning via the [`startCapturing`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html#startcapturing) method while being configured to the `ReadDriversLicense` template.
-
-The code snippet below shows the simplest implementation of *ScannerPage* that will set up and launch the Driver License Scanner. Please note that in order to use the Driver License Scanner, a **valid license must be defined in the code**.
+Create scan_page.dart and insert the full workflow:
```dart
import 'package:dynamsoft_capture_vision_flutter/dynamsoft_capture_vision_flutter.dart';
@@ -106,19 +75,25 @@ class ScannerPage extends StatefulWidget {
}
class _ScannerPageState extends State with RouteAware {
+ // Create the CaptureVisionRouter instance. The CaptureVisionRouter is the class for managing the barcode scanning process.
final CaptureVisionRouter _cvr = CaptureVisionRouter.instance;
+ // Create the camera instance
final CameraEnhancer _camera = CameraEnhancer.instance;
final String _templateName = "ReadDriversLicense";
+ // Define the result receiver for receiving the captured results.
late final CapturedResultReceiver _receiver = CapturedResultReceiver()
..onParsedResultsReceived = (ParsedResult result) async {
if (result.items?.isNotEmpty ?? false) {
+ // Stop capturing when dealing with the results.
_cvr.stopCapturing();
+ // Transfer the parsed result into driver license format data.
final data = DriverLicenseData.fromParsedResultItem(result.items![0]);
if (data != null) {
final scanResult = DriverLicenseScanResult(resultStatus: EnumResultStatus.finished, data: data);
Navigator.pop(context, scanResult);
} else {
- _cvr.startCapturing(_templateName); // restart capturing
+ // If data == null, restart capturing
+ _cvr.startCapturing(_templateName);
}
}
};
@@ -126,7 +101,9 @@ class _ScannerPageState extends State with RouteAware {
@override
void initState() {
super.initState();
+ // Request camera permission
PermissionUtil.requestCameraPermission();
+ // A valid license is required.
LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9').then((data) {
final (isSuccess, message) = data;
if (!isSuccess) {
@@ -137,10 +114,14 @@ class _ScannerPageState extends State with RouteAware {
}
void initSdk() async {
+ // Bind the Camera instance with the CaptureVisionRouter instance.
await _cvr.setInput(_camera);
+ // Bind the result receiver with the CaptureVisionRouter instance.
_cvr.addResultReceiver(_receiver);
+ // Open the camera
_camera.open();
try {
+ // Start the capturing process.
await _cvr.startCapturing(_templateName);
} catch (e) {
Navigator.of(context).pop(
@@ -155,6 +136,7 @@ class _ScannerPageState extends State with RouteAware {
@override
void dispose() {
super.dispose();
+ // Stop capturing, close the camera, and remove the result receiver when disposing.
_cvr.stopCapturing();
_camera.close();
_cvr.removeResultReceiver(_receiver);
@@ -184,18 +166,19 @@ class _ScannerPageState extends State with RouteAware {
> [!NOTE]
>
-> - `DriverLicenseData.fromParsedResultItem()` is a helper function to convert a [`ParsedResultItem`]({{ site.dcp_flutter_api }}parsed-result-item.html) into a more user-friendly structure (`DriverLicenseData`). You can get the source code from [driver_license_scan_result.dart](https://github.com/Dynamsoft/barcode-reader-flutter-samples/blob/main/ScanDriversLicense/lib/driver_license_scan_result.dart).
>- 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 [Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=guide&package=mobile) portal.
+>- 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=flutter){:target="_blank"} link.
-### Define the Result Classes and Related APIs
+Related APIs:
-The next step in building this app is to create the `DriverLicenseScanResult` class which will be used to represent the parsed information that is output by the library. **For the full implementation of this class, please refer to [*driver_license_scan_result.dart*](https://github.com/Dynamsoft/barcode-reader-flutter-samples/blob/main/ScanDriversLicense/lib/driver_license_scan_result.dart). Here is a quick breakdown of the `DriverLicenseScanResult` class:
+- [`LicenseManager`]({{ site.dcv_flutter_api }}license/license-manager.html) - licensing.
+- [`CameraEnhancer`]({{ site.dce_flutter_api }}camera-enhancer.html) - camera operations
+- [`CaptureVisionRouter`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html) - manages the scanning workflow
+- [`CapturedResultReceiver`]({{ site.dcv_flutter_api }}capture-vision-router/captured-result-receiver.html) - receives processed results
-- `resultStatus` represents whether the result was produced successfully, if the scan operation was cancelled, or if an error occurred during the scanning process.
-- `data` is a `DriverLicenseData` object that represents the parsed information as different string fields which can then be accessed via these key fields and presented to the user in a friendly manner.
- - `DriverLicenseData` is created from a [`ParsedResultItem`]({{ site.dcp_flutter_api }}parsed-result-item.html) object via the `fromParsedResultItem()` function that is defined in the `DriverLicenseData` class.
-- `errorString` is the error message that is produced should the `resultStatus` be `exception`.
+### Define Result Models
+
+Create `driver_license_scan_result.dart` and include the data structures used to represent parsed driver license fields.
```dart
import 'package:dynamsoft_capture_vision_flutter/dynamsoft_capture_vision_flutter.dart';
@@ -207,8 +190,11 @@ enum EnumResultStatus {
}
class DriverLicenseScanResult {
+ // Represents whether the result was produced successfully, if the scan operation was cancelled, or if an error occurred during the scanning process.
EnumResultStatus resultStatus;
+ // When the resultStatus is "exception". You will receive the error message here.
String? errorString = "";
+ // A DriverLicenseData object that represents the parsed information as different string fields. Created from a ParsedResultItem.
DriverLicenseData? data;
DriverLicenseScanResult({
required this.resultStatus,
@@ -315,9 +301,9 @@ class DriverLicenseData {
}
```
-### Direct From the User Page to the Scan Page
+### Navigating to Scan Page
-Now that the main Scanner widget and the `DriverLicenseScanResult` class are implemented, it's time to bring them together in the *main.dart* of the project. For the full implementation of *main.dart*, please see the code below:
+Add navigation logic in `main.dart` to trigger the scanner and display results.
```dart
import 'package:flutter/material.dart';
@@ -398,21 +384,16 @@ class _MyHomePageState extends State {
}
```
-## Customize the Driver License Scanner
-
-Even though the Driver License Scanner comes with a template that is optimized for the typical driver license scanning scenario, there could be situations that require a different approach in order to get handled properly. The Driver License Scanner comes with a wide range of customizations, whether it is UI related, performance related, or a mix of both.
+### Customize the Driver License Scanner (Optional)
-In this next section we will explore one of the ways in which the Driver License Scanner can be customized - specifying a scan region.
+Although the Driver License Scanner template is optimized for common scenarios, you may customize performance or UI behavior as needed.
-### Specify the Scan Region
+#### Specify the Scan Region
-You can limit the scan region of the library so that it doesn't exhaust resources trying to read from the entire image or frame.
+Restricting the scan region can reduce processing time and avoid reading unwanted areas:
```dart
-final CameraEnhancer _camera = CameraEnhancer.instance;
-
void initSdk() async {
- //......
final scanRegion = DSRect(left: 0.1, top: 0.4, right: 0.9, bottom: 0.6, measuredInPercentage: true);
_camera.setScanRegion(scanRegion);
}
@@ -422,32 +403,42 @@ void initSdk() async {
### iOS
-Before the project can be deployed to a *iOS* device, the camera permissions and the developer signature must first be set. To add the camera permissions to the iOS portion of the app, we recommend first installing the **pods** dependencies to generate the **.xcworkspace** project under the ios folder (`ios/Runner.xcworkspace`). Please run the following commands from the root directory:
-
-```bash
-cd ios/
-pod install --repo-update
-```
+1. Install CocoaPods dependencies
-#### Camera Permissions
+ Before the project can be deployed to a *iOS* device, the camera permissions and the developer signature must first be set. To add the camera permissions to the iOS portion of the app, we recommend first installing the **pods** dependencies to generate the **.xcworkspace** project under the ios folder (`ios/Runner.xcworkspace`). Please run the following commands from the root directory:
-Once the pods are installed, *Runner.xcworkspace* should now be generated in the *ios* folder. To add the camera permissions, open the generated *Runner.xcworkspace* and navigate to the *Info* section of the project settings. Then you must add the "Privacy - Camera Usage Description" key to the list (where you can also assign a string message to show in the alert box).
+ ```bash
+ cd ios/
+ pod install --repo-update
+ ```
-#### Deploying to Device
+2. Configure the project in Xcode
-In order to deploy the app to a iOS device, we recommend doing it via Xcode by using the `Runner.xcworkspace` project that was generated when the pods were installed. Since the camera permissions are taken care of, all you need to do is properly configure the *Signing & Capabilities* section of the project settings. Should the iOS device be connected to the computer, you can now run and deploy the app to the device.
+ Open Runner.xcworkspace in Xcode and:
-If everything is set up correctly, you should see the app running on your device.
+ - Add **Privacy – Camera Usage Description** under **Project → Info**
+ - Configure **Signing & Capabilities**
+ - Connect your device and run the project
### Android
-Go to the project folder, open a new terminal and run the following command:
+Run the app:
+
+```bash
+flutter run
+```
+
+Run on a specific device:
```bash
flutter run -d
```
-You can get the IDs of all connected (physical) devices by running the command `flutter devices`.
+List devices:
+
+```bash
+flutter devices
+```
## Full Sample Code
@@ -455,7 +446,7 @@ The full sample code is available [here](https://github.com/Dynamsoft/barcode-re
## License
-You can request a 30-day trial license via the [Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=github&package=mobile) portal.
+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=mobile){:target="_blank"} link.
## Support
diff --git a/programming/flutter/foundational-user-guide.md b/programming/flutter/foundational-user-guide.md
index f3ef3d71..d8911656 100644
--- a/programming/flutter/foundational-user-guide.md
+++ b/programming/flutter/foundational-user-guide.md
@@ -10,9 +10,9 @@ noTitleIndex: true
# Barcode Reader Integration Guide (Foundational Edition)
-This guide will help you develop a barcode scanning app using the [Dynamsoft Capture Vision Foundational API]({{ site.dcv_flutter_api }}).
+This guide walks you through building a barcode scanning app using the [Dynamsoft Capture Vision Foundational API]({{ site.dcv_flutter_api }}).
-Dynamsoft Capture Vision (DCV) is an aggregating library for several of Dynamsoft's functional products, including the Dynamsoft Barcode Reader SDK. The [`Capture Vision API`]({{ site.dcv_flutter_api }}) does not come with a pre-built UI or an easy configuration interface like the BarcodeScanner component (see this [guide](user-guide.md)) - but it does provide the user with more parameters to control the barcode reading performance and settings.
+The Foundational API provides full control over barcode scanning performance and settings. Unlike the Ready-To-Use BarcodeScanner component ([guide](user-guide.md)), you'll build your own UI and configure the scanning workflow using the [`CaptureVisionRouter`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html) and [`CameraEnhancer`]({{ site.dce_flutter_api }}camera-enhancer.html) APIs.
## System Requirements
@@ -26,51 +26,23 @@ Dynamsoft Capture Vision (DCV) is an aggregating library for several of Dynamsof
* Supported ABI: arm64 and x86_64
* Development Environment: Xcode 13+ (Xcode 14.1+ recommended)
-> [!TIP]
-> If you are downloading Xcode or Android Studio for the first time, please remember to also install the command-line tools.
-
-> [!NOTE]
-> Please note that the sample projects that we offer were built and tested with Flutter 3.35.7
+## Adding the Library
-## Including the Library
-
-Run the following command in the root directory of your flutter project to add `dynamsoft_barcode_reader_bundle_flutter` to the dependencies:
+Run the following in your project root:
```bash
flutter pub add dynamsoft_barcode_reader_bundle_flutter
-```
-
-Then run the following command to install all the dependencies:
-
-```bash
flutter pub get
```
-## Building the Barcode Reader Widget
-
-Now that the package is added, it's time to start building the Barcode Reader widget.
-
-### Importing the Library
-
-To use the Capture Vision API, please import `dynamsoft_capture_vision_flutter` in *main.dart*:
-
-```dart
-import 'package:dynamsoft_capture_vision_flutter/dynamsoft_capture_vision_flutter.dart';
-```
-
-### Quick Start
+> [!NOTE]
+> Adding `dynamsoft_barcode_reader_bundle_flutter` automatically includes `dynamsoft_capture_vision_flutter`, which is the library you'll interact with directly.
-In order to implement the full barcode reader workflow, the following needs to be done in order:
+## Building the Barcode Reader
-- Define a valid license via the [`LicenseManager`]({{ site.dcv_flutter_api }}license/license-manager.html)
-- Initialize the [`CameraEnhancer`]({{ site.dce_flutter_api }}camera-enhancer.html) object
-- Initialize the [`CaptureVisionRouter`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html) object
-- Bind the `CameraEnhancer` object to the `CaptureVisionRouter` object
-- Register a [`CapturedResultReceiver`]({{ site.dcv_flutter_api }}capture-vision-router/captured-result-receiver.html) object to listen for decoded barcodes via the callback function [`onDecodedBarcodesReceived`]({{ site.dcv_flutter_api }}capture-vision-router/captured-result-receiver.html#ondecodedbarcodesreceived)
-- Open the camera
-- Start barcode scanning via the [`startCapturing`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html#startcapturing) method
+### Configure the `main.dart`
-The code snippet below shows the simplest implementation that will set up and launch the Barcode Reader. Please note that in order to use the Barcode Reader, a **valid license must be defined in the code**.
+Replace your **main.dart** with the following code:
```dart
import 'package:flutter/material.dart';
@@ -104,14 +76,18 @@ class MyHomePage extends StatefulWidget {
}
class _MyHomePageState extends State {
+ // Create the CaptureVisionRouter instance. The CaptureVisionRouter is the class for managing the barcode scanning process.
final CaptureVisionRouter _cvr = CaptureVisionRouter.instance;
+ // Create the camera instance
final CameraEnhancer _camera = CameraEnhancer.instance;
final String _templateName = EnumPresetTemplate.readBarcodes;
+ // Define the result receiver for receiving the captured results.
late final CapturedResultReceiver _receiver = CapturedResultReceiver()
..onDecodedBarcodesReceived = (DecodedBarcodesResult result) async {
if (result.items?.isNotEmpty ?? false) {
- _cvr.stopCapturing(); // stop the camera and the capture process
- var displayString = result.items?.map((item) => "Format: ${item.formatString}\nText: ${item.text}").join('\n\n'); // create a string from the barcode text to be displayed in the alert box
+ // Stop capturing when dealing with the results.
+ _cvr.stopCapturing();
+ var displayString = result.items?.map((item) => "Format: ${item.formatString}\nText: ${item.text}").join('\n\n');
showTextDialog("Barcodes Count: ${result.items?.length ?? 0}", displayString ?? "", () {
_cvr.startCapturing(_templateName);
});
@@ -121,7 +97,9 @@ class _MyHomePageState extends State {
@override
void initState() {
super.initState();
+ // Request camera permission
PermissionUtil.requestCameraPermission();
+ // A valid license is required.
LicenseManager.initLicense('DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9').then((data) {
final (isSuccess, message) = data;
if (!isSuccess) {
@@ -132,11 +110,15 @@ class _MyHomePageState extends State {
}
void initSdk() async {
- await _cvr.setInput(_camera); //bind CameraEnhancer and CaptureVisonRouter
- _cvr.addResultReceiver(_receiver); //Register `CapturedResultReceiver` object to listen for parsed decoded barcodes result
+ // Bind the Camera instance with the CaptureVisionRouter instance.
+ await _cvr.setInput(_camera);
+ // Bind the result receiver with the CaptureVisionRouter instance.
+ _cvr.addResultReceiver(_receiver);
+ // Open the camera
_camera.open();
try {
- await _cvr.startCapturing(_templateName); //Start capturing
+ // Start the capturing process.
+ await _cvr.startCapturing(_templateName);
} catch (e) {
showTextDialog("StartCapturing Error", e.toString(), null);
}
@@ -157,6 +139,7 @@ class _MyHomePageState extends State {
@override
void dispose() {
super.dispose();
+ // Stop capturing, close the camera, and remove the result receiver when disposing.
_cvr.stopCapturing();
_camera.close();
_cvr.removeResultReceiver(_receiver);
@@ -166,7 +149,7 @@ class _MyHomePageState extends State {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: Text(widget.title)),
- body: Center(child: CameraView(cameraEnhancer: _camera)), // Bind CameraView and CameraEnhancer
+ body: Center(child: CameraView(cameraEnhancer: _camera)),
);
}
}
@@ -175,31 +158,26 @@ class _MyHomePageState extends State {
> [!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 [Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=guide&package=mobile) portal.
-
-## Configuring the Barcode Reader (Optional)
+>- 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=flutter){:target="_blank"} link.
-The Barcode Reader library comes with many customization parameters that can affect the performance of the SDK. Whether you are looking speed up the scan process or increase the read rate when reading a batch of barcodes at once, these parameters can prove to be quite useful in making the Barcode Reader adapt to any kind of situation that it is put in.
+Related APIs:
-> [!TIP]
-> The Barcode Reader settings can be changed in two ways:
-> 1. Using the [`SimplifiedBarcodeReaderSettings`](./api-reference/barcode-reader/simplified-barcode-reader-settings.md) class (via the [`SimplifiedCaptureVisionSettings`]({{ site.dcv_flutter_api }}capture-vision-router/simplified-capture-vision-settings.html) class) and the [`updateSettings`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html#updatesettings) method.
-> 2. Using a JSON template file that contains the algorithm parameters, which is then applied using the [`initSettings`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html#initsettings) method.
->
-> If you are looking to create a custom JSON settings template, please refer to this [page](https://www.dynamsoft.com/barcode-reader/docs/core/programming/features/use-runtimesettings-or-templates.html?lang=objc,swift#json-template).
+- [`LicenseManager`]({{ site.dcv_flutter_api }}license/license-manager.html) - licensing.
+- [`CameraEnhancer`]({{ site.dce_flutter_api }}camera-enhancer.html) - camera operations
+- [`CaptureVisionRouter`]({{ site.dcv_flutter_api }}capture-vision-router/capture-vision-router.html) - manages the scanning workflow
+- [`CapturedResultReceiver`]({{ site.dcv_flutter_api }}capture-vision-router/captured-result-receiver.html) - receives processed results
-### Specify Barcode Formats and Count
+### Customize the Barcode Reader (Optional)
-One of the main parameters that is available to the Barcode Reader is the `barcodeFormatIds` - which sets what barcode symbologies will be read. Another one of those parameters is the `expectedBarcodesCount` - which specifies how many barcodes are expected to be read in a frame or image. Now let's see the ways we can configure these parameters
+Although the default barcode reader template is optimized for common scenarios, you may customize performance or behavior as needed.
-#### Using the `SimplifiedCaptureVisionSettings` class
+#### Specify Barcode Formats and Count
-The settings of the Barcode Reader can be configured using the [`SimplifiedBarcodeReaderSettings`](./api-reference/barcode-reader/simplified-barcode-reader-settings.md) class (via [`SimplifiedCaptureVisionSettings`]({{ site.dcv_flutter_api }}capture-vision-router/simplified-capture-vision-settings.html)).
+You can configure which barcode formats to read and how many barcodes to expect per frame.
-> [!NOTE]
-> Please note that as the name implies, `SimplifiedBarcodeReaderSettings` gives the user access to only the basic and most important barcode reader settings. If you would like to utilize the full range of barcode reader settings, please go to the [JSON template section](#using-a-json-template).
+##### Option 1. Using SimplifiedCaptureVisionSettings
-Taking the code snippet in the [Quick Start section](#quick-start), we will edit the `initSdk` function to configure the `expectedBarcodesCount` and the `barcodeFormatIds` of the Barcode Reader instance via `SimplifiedCaptureVisionSettings` and `SimplifiedBarcodeReaderSettings`.
+Configure basic settings using the [`SimplifiedBarcodeReaderSettings`](./api-reference/barcode-reader/simplified-barcode-reader-settings.md) class:
```dart
void initSdk() async {
@@ -219,9 +197,9 @@ void initSdk() async {
}
```
-#### Using a JSON Template
+##### Option 2. Using a JSON Template
-The first thing that we need to do is create the JSON template. Here is a basic JSON template example that configures the `BarcodeFormatIds` and the `ExpectedBarcodesCount`
+For advanced customization, create a JSON template that configures the barcode reader parameters:
```json
{
@@ -247,14 +225,14 @@ The first thing that we need to do is create the JSON template. Here is a basic
}
```
-Now that you have the JSON template, it's time to convert it to a JSON string and then use the initSettings method to apply those settings.
+Apply the JSON template using the `initSettings` method:
```dart
void initSdk() async {
//...
_cvr.initSettings("{\"CaptureVisionTemplates\":[{\"Name\":\"CV_0\",\"ImageROIProcessingNameArray\":[\"TA_0\"]}],\"TargetROIDefOptions\":[{\"Name\":\"TA_0\",\"TaskSettingNameArray\":[\"BR_0\"]}],\"BarcodeReaderTaskSettingOptions\":[{\"Name\":\"BR_0\",\"BarcodeFormatIds\":[\"BF_ONED\",\"BF_QR_CODE\"],\"ExpectedBarcodesCount\":0}]}");
//...
- _cvr_.startCapturing("CV_0"); // since the CaptureVisionTemplate is called CV_0, then that is the template name that should be used with startCapturing
+ _cvr.startCapturing("CV_0"); // Use the template name defined in the JSON
}
```
@@ -263,59 +241,64 @@ void initSdk() async {
>
> To learn how to create your own JSON template, please refer to this [page](https://www.dynamsoft.com/barcode-reader/docs/core/programming/features/use-runtimesettings-or-templates.html?lang=objc,swift#json-template).
-### UI Customization
+#### Specify the Scan Region
-If you would like to learn more on how to customize the UI, please refer to the [UI Customization](explore-features/ui-customization.md) guide.
+Restricting the scan region can reduce processing time and avoid reading unwanted areas:
-### Advanced Features
+```dart
+void initSdk() async {
+ final scanRegion = DSRect(left: 0.1, top: 0.4, right: 0.9, bottom: 0.6, measuredInPercentage: true);
+ _camera.setScanRegion(scanRegion);
+}
+```
-If you would like to learn about some of the advanced features of the library and how to implement them, please refer to the [Advanced Features](explore-features/advanced-features.md) guide.
+#### Additional Customization
-## Run the Project
+For more advanced customization options:
-### iOS
+- [UI Customization](explore-features/ui-customization.md) - Customize the camera view and overlay
+- [Advanced Features](explore-features/advanced-features.md) - Explore advanced barcode reading features
-Before the project can be deployed to a *iOS* device, the camera permissions and the developer signature must first be set. To add the camera permissions to the iOS portion of the app, we recommend first installing the **pods** dependencies to generate the **.xcworkspace** project under the ios folder (`ios/Runner.xcworkspace`). Please run the following commands from the root directory:
+## Run the Project
-```bash
-cd ios/
-pod install --repo-update
-```
+### iOS
-Once the pods are installed, *Runner.xcworkspace* should now be generated in the *ios* folder.
+1. Install CocoaPods dependencies
-#### Camera Permissions
+ Before the project can be deployed to an iOS device, the camera permissions and the developer signature must first be set. To add the camera permissions to the iOS portion of the app, we recommend first installing the **pods** dependencies to generate the **.xcworkspace** project under the ios folder (`ios/Runner.xcworkspace`). Please run the following commands from the root directory:
-To add the **camera permissions**, open the generated *Runner.xcworkspace* and navigate to the *Info* section of the project settings. Then you must add the "Privacy - Camera Usage Description" key to the list (where you can also assign a string message to show in the alert box).
+ ```bash
+ cd ios/
+ pod install --repo-update
+ ```
-#### Deploying to Device
+2. Configure the project in Xcode
-In order to deploy the app to a iOS device, we recommend doing it via Xcode by using the `Runner.xcworkspace` project that was generated when the pods were installed. Since the camera permissions are taken care of, all you need to do is properly configure the *Signing & Capabilities* section of the project settings. Should the iOS device be connected to the computer, you can now run and deploy the app to the device.
+ Open Runner.xcworkspace in Xcode and:
-If everything is set up correctly, you should see the app running on your device.
+ - Add **Privacy – Camera Usage Description** under **Project → Info**
+ - Configure **Signing & Capabilities**
+ - Connect your device and run the project
### Android
-#### Camera Permissions
-
-On Android, permission to use the camera must be set in the code as such:
+Run the app:
-```dart
-PermissionUtil.requestCameraPermission();
+```bash
+flutter run
```
-> [!NOTE]
-> This is done via the [`PermissionUtil`]({{ site.dcv_flutter_api }}utility/permission-util.html) class. Please note that the code snippets in the previous sections contain this line in order to make the app run successfully.
-
-#### Deploying to Device
-
-Go to the project folder, open a new terminal and run the following command:
+Run on a specific device:
```bash
flutter run -d
```
-You can get the IDs of all connected (physical) devices by running the command `flutter devices`.
+List devices:
+
+```bash
+flutter devices
+```
## Full Sample Code
@@ -323,7 +306,7 @@ The full sample code is available [here](https://github.com/Dynamsoft/barcode-re
## License
-You can request a 30-day trial license via the [Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=github&package=mobile) portal.
+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=mobile){:target="_blank"} link.
## Support
diff --git a/programming/flutter/user-guide.md b/programming/flutter/user-guide.md
index d30cc6b5..e99ebbee 100644
--- a/programming/flutter/user-guide.md
+++ b/programming/flutter/user-guide.md
@@ -29,38 +29,19 @@ Even though the UI comes with a default look, the [`BarcodeScanner` API](api-ref
* Supported ABI: arm64 and x86_64
* Development Environment: Xcode 13+ (Xcode 14.1+ recommended)
-> [!TIP]
-> If you are downloading Xcode or Android Studio for the first time, please remember to also install the command-line tools.
-
-> [!NOTE]
-> Please note that the sample projects that we offer were last tested with Flutter 3.35.7
-
-## Including the Library
+## Adding the Library
-Run the following command in the root directory of your flutter project to add `dynamsoft_barcode_reader_bundle_flutter` to the dependencies:
+Run the following in your project root:
```bash
flutter pub add dynamsoft_barcode_reader_bundle_flutter
-```
-
-Then run the following command to install all the dependencies:
-
-```bash
flutter pub get
```
-## Building the Barcode Scanner Widget
+## Building the Barcode Scanner
Now that the package is added, it's time to start building the `BarcodeScanner` widget.
-### Importing the Library
-
-To use the BarcodeScanner API, please import `dynamsoft_barcode_reader_bundle_flutter` in *main.dart*:
-
-```dart
-import 'package:dynamsoft_barcode_reader_bundle_flutter/dynamsoft_barcode_reader_bundle_flutter.dart';
-```
-
### Quick Start
Replace your **main.dart** with the following code:
@@ -207,41 +188,42 @@ var config = BarcodeScannerConfig(
### iOS
-Before the project can be deployed to a *iOS* device, the camera permissions and the developer signature must first be set. To add the camera permissions to the iOS portion of the app, we recommend first installing the **pods** dependencies to generate the **.xcworkspace** project under the ios folder (`ios/Runner.xcworkspace`). Please run the following commands from the root directory:
+1. Install CocoaPods dependencies
-```bash
-cd ios/
-pod install --repo-update
-```
-
-Once the pods are installed, *Runner.xcworkspace* should now be generated in the *ios* folder.
-
-#### Camera Permissions
+ Before the project can be deployed to an iOS device, the camera permissions and the developer signature must first be set. To add the camera permissions to the iOS portion of the app, we recommend first installing the **pods** dependencies to generate the **.xcworkspace** project under the ios folder (`ios/Runner.xcworkspace`). Please run the following commands from the root directory:
-To add the **camera permissions**, open the generated *Runner.xcworkspace* and navigate to the *Info* section of the project settings. Then you must add the "Privacy - Camera Usage Description" key to the list (where you can also assign a string message to show in the alert box).
+ ```bash
+ cd ios/
+ pod install --repo-update
+ ```
-#### Deploying to Device
+2. Configure the project in Xcode
-In order to deploy the app to a iOS device, we recommend doing it via Xcode by using the `Runner.xcworkspace` project that was generated when the pods were installed. Since the camera permissions are taken care of, all you need to do is properly configure the *Signing & Capabilities* section of the project settings. Should the iOS device be connected to the computer, you can now run and deploy the app to the device.
-
-If everything is set up correctly, you should see the app running on your device.
-
-Once the pods are installed, *Runner.xcworkspace* should now be generated in the *ios* folder. To add the camera permissions, open the generated *Runner.xcworkspace* and navigate to the *Info* section of the project settings. Then you must add the "Privacy - Camera Usage Description" key to the list (where you can also assign a string message to show in the alert box).
+ Open Runner.xcworkspace in Xcode and:
+ - Add **Privacy – Camera Usage Description** under **Project → Info**
+ - Configure **Signing & Capabilities**
+ - Connect your device and run the project
### Android
-#### Deploying to Device
-
-Go to the project root folder, open a new terminal and run the following command:
+Run the app:
```bash
flutter run
-# or
-flutter run -d
```
-You can get the IDs of all connected (physical) devices by running the command `flutter devices`.
+Run on a specific device:
+
+```bash
+flutter run -d
+```
+
+List devices:
+
+```bash
+flutter devices
+```
## Full Sample Code
@@ -249,7 +231,7 @@ The full sample code is available [here](https://github.com/Dynamsoft/barcode-re
## License
-You can request a 30-day trial license via the [Request Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=github&package=mobile) link.
+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=mobile){:target="_blank"} link.
## Support
diff --git a/programming/react-native/user-guide.md b/programming/react-native/user-guide.md
index de03e1e7..9490f258 100644
--- a/programming/react-native/user-guide.md
+++ b/programming/react-native/user-guide.md
@@ -234,7 +234,7 @@ The full sample code is available [here](https://github.com/Dynamsoft/barcode-re
## License
-You can request a 30-day trial license via the [Request Trial License](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=github&package=mobile) link.
+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=github&package=mobile) link.
## Support
From 76f048173e1a330015476a9c96bd418fd976bc97 Mon Sep 17 00:00:00 2001
From: Dynamsoft-Henry <78675724+Dynamsoft-Henry@users.noreply.github.com>
Date: Thu, 11 Dec 2025 17:38:54 +0800
Subject: [PATCH 2/2] Updated DCE enum links
---
.../programming-android.html | 16 ++++++++--------
.../sidelist-programming/programming-oc.html | 16 ++++++++--------
programming/android/release-notes/android-11.md | 7 +++++++
3 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/_includes/sidelist-programming/programming-android.html b/_includes/sidelist-programming/programming-android.html
index fab3c792..d4b3c46e 100644
--- a/_includes/sidelist-programming/programming-android.html
+++ b/_includes/sidelist-programming/programming-android.html
@@ -334,14 +334,14 @@
Enumerations
diff --git a/_includes/sidelist-programming/programming-oc.html b/_includes/sidelist-programming/programming-oc.html
index 767bad85..9297e1ff 100644
--- a/_includes/sidelist-programming/programming-oc.html
+++ b/_includes/sidelist-programming/programming-oc.html
@@ -333,14 +333,14 @@
Enumerations
diff --git a/programming/android/release-notes/android-11.md b/programming/android/release-notes/android-11.md
index ed180b93..2ba9c7eb 100644
--- a/programming/android/release-notes/android-11.md
+++ b/programming/android/release-notes/android-11.md
@@ -66,6 +66,13 @@ The following APIs are provided for configuring the `cameraToggleButton`:
- [`setCameraToggleButtonVisible`]({{ site.dce_android }}auxiliary-api/dcecameraview.html#setcameratogglebuttonvisible)
- [`getCameraToggleButtonVisible`]({{ site.dce_android }}auxiliary-api/dcecameraview.html#getcameratogglebuttonvisible)
+### Changed
+
+- Changed the enumeration value of [`EnumEnhancerFeatures`]({{ site.dce_android}}enum/enhanced-features.html):
+ - Changed `EF_AUTO_ZOOM` from `1 << 4` to `1 << 3`.
+ - Changed `EF_SMART_TORCH` from `1 << 5` to `1 << 4`.
+ - Changed `EF_ALL` from `0x3F` to `0x1F`.
+
## 11.0.5000 (07/29/2025)
### New