diff --git a/_data/product_version.yml b/_data/product_version.yml index 8c5a951..7e638de 100644 --- a/_data/product_version.yml +++ b/_data/product_version.yml @@ -4,4 +4,5 @@ version_info_list_mobile: - value: latest version - value: 2.x child: + - 2.0.21_ios - 2.0.20 diff --git a/assets/js/dcpMobileVersionSearch.json b/assets/js/dcpMobileVersionSearch.json index 4730bbe..1b0f8b1 100644 --- a/assets/js/dcpMobileVersionSearch.json +++ b/assets/js/dcpMobileVersionSearch.json @@ -1,5 +1,154 @@ [ { + "version": "2.2.10", + "matchList": { + "android":{ + "dcvRepoMobile": [ + { + "path": "/programming/android/api-reference/license", + "version": "3.2.10" + }, { + "path": "/programming/android/api-reference/core", + "version": "3.2.10" + } + ], + "dcvRepoCore": [ + { + "path": "/enums/core", + "version": "3.2.10" + },{ + "path": "/parameters/reference/capture-vision-template", + "version": "2.2.10" + },{ + "path": "/parameters/reference/target-roi-def", + "version": "2.2.10" + },{ + "path": "/parameters/reference/code-parser-task-settings", + "version": "2.2.10" + },{ + "path": "/parameters/reference/image-parameter", + "version": "2.2.10" + },{ + "path": "/parameters/reference/semantic-processing", + "version": "3.2.10" + },{ + "path": "/parameters/reference/image-source-options", + "version": "3.2.10" + },{ + "path": "/parameters/reference/global-parameter", + "version": "2.2.10" + },{ + "path": "/parameters/reference/label-recognizer-task-settings", + "version": "3.2.10" + },{ + "path": "/parameters/reference/text-line-specification", + "version": "3.2.10" + },{ + "path": "/parameters/reference/barcode-reader-task-settings", + "version": "10.2.10" + } + ] + }, + "ios":{ + "dcvRepoMobile": [ + { + "path": "/programming/objectivec-swift/api-reference/license", + "version": "3.2.11" + }, { + "path": "/programming/objectivec-swift/api-reference/core", + "version": "3.2.11" + } + ], + "dcvRepoCore": [ + { + "path": "/enums/core", + "version": "3.2.10" + },{ + "path": "/parameters/reference/capture-vision-template", + "version": "2.2.10" + },{ + "path": "/parameters/reference/target-roi-def", + "version": "2.2.10" + },{ + "path": "/parameters/reference/code-parser-task-settings", + "version": "2.2.10" + },{ + "path": "/parameters/reference/image-parameter", + "version": "2.2.10" + },{ + "path": "/parameters/reference/semantic-processing", + "version": "3.2.10" + },{ + "path": "/parameters/reference/image-source-options", + "version": "3.2.10" + },{ + "path": "/parameters/reference/global-parameter", + "version": "2.2.10" + },{ + "path": "/parameters/reference/label-recognizer-task-settings", + "version": "3.2.10" + },{ + "path": "/parameters/reference/text-line-specification", + "version": "3.2.10" + },{ + "path": "/parameters/reference/barcode-reader-task-settings", + "version": "10.2.10" + } + ] + } + } + }, { + "version": "2.0.21", + "matchList": { + "ios":{ + "dcvRepoMobile": [ + { + "path": "/programming/objectivec-swift/api-reference/license", + "version": "3.0.20" + }, { + "path": "/programming/objectivec-swift/api-reference/core", + "version": "3.0.20" + } + ], + "dcvRepoCore": [ + { + "path": "/enums/core", + "version": "3.0.20" + },{ + "path": "/parameters/reference/capture-vision-template", + "version": "2.0.21" + },{ + "path": "/parameters/reference/target-roi-def", + "version": "2.0.21" + },{ + "path": "/parameters/reference/code-parser-task-settings", + "version": "2.0.20" + },{ + "path": "/parameters/reference/image-parameter", + "version": "2.0.21" + },{ + "path": "/parameters/reference/semantic-processing", + "version": "3.0.20" + },{ + "path": "/parameters/reference/image-source-options", + "version": "3.0.20" + },{ + "path": "/parameters/reference/global-parameter", + "version": "2.0.21" + },{ + "path": "/parameters/reference/label-recognizer-task-settings", + "version": "3.0.20" + },{ + "path": "/parameters/reference/text-line-specification", + "version": "3.0.20" + },{ + "path": "/parameters/reference/barcode-reader-task-settings", + "version": "10.0.21" + } + ] + } + } + },{ "version": "2.0.20", "matchList": { "android":{ diff --git a/programming/android/release-notes/android-2.md b/programming/android/release-notes/android-2.md index 1cedade..55d5d22 100644 --- a/programming/android/release-notes/android-2.md +++ b/programming/android/release-notes/android-2.md @@ -8,6 +8,16 @@ needGenerateH3Content: false # Release Notes for Android Edition - 2.x +## 2.2.10 (04/16/2024) + +### Improved + +- Security update for `DynamsoftCodeParser` and its related libraries. + +### Fixed + +- Small fixes and tweaks. + ## 2.0.20 (12/07/2023) {%- include release-notes/product-highlight-2.0.0.md -%} diff --git a/programming/android/release-notes/index.md b/programming/android/release-notes/index.md index e1f6d16..8158cc4 100644 --- a/programming/android/release-notes/index.md +++ b/programming/android/release-notes/index.md @@ -8,4 +8,5 @@ needAutoGenerateSidebar: false # Release Notes - Android Edition +- [2.2.10 (04/16/2024)](android-2.md#2210-04162024) - [2.0.20 (12/07/2023)](android-2.md#2020-12072023) diff --git a/programming/android/user-guide/getting-started-v2.0.20.md b/programming/android/user-guide/getting-started-v2.0.20.md new file mode 100644 index 0000000..6d00eea --- /dev/null +++ b/programming/android/user-guide/getting-started-v2.0.20.md @@ -0,0 +1,242 @@ +--- +layout: default-layout +title: User Guide - Dynamsoft Code Parser SDK Android Edition +description: This is the user guide of Dynamsoft Code Parser SDK Android Edition. +keywords: user guide, Android +needAutoGenerateSidebar: true +needGenerateH3Content: true +noTitleIndex: true +--- + +# Dynamsoft Code Parser - Android User Guide + +- [Dynamsoft Code Parser - Android User Guide](#dynamsoft-code-parser---android-user-guide) + - [Requirements](#requirements) + - [Add the Libraries](#add-the-libraries) + - [Add the Libraries Manually](#add-the-libraries-manually) + - [Add the Libraries via Maven](#add-the-libraries-via-maven) + - [Build Your First Application](#build-your-first-application) + - [Create a New Project](#create-a-new-project) + - [Include the Library](#include-the-library) + - [Initialize the License](#initialize-the-license) + - [Initialize Code Parser And Parse the Code Bytes](#initialize-code-parser-and-parse-the-code-bytes) + - [Display Parsed Results](#display-parsed-results) + - [Build and Run the Project](#build-and-run-the-project) + +## Requirements + +- Supported OS: Android 5.0 (API Level 21) or higher. +- Supported ABI: **armeabi-v7a**, **arm64-v8a**, **x86** and **x86_64**. +- Development Environment: Android Studio 2022.2.1 or higher. + +## Add the Libraries + +The Dynamsoft Code Parser (DCP) Android SDK comes with four libraries: + + | File | Description | + |---------|-------------| + | `DynamsoftCodeParser.aar` | The Dynamsoft Code Parser library, which includes code parsing logic and related APIs. | + | `DynamsoftCore.aar` | The core library, which includes common basic structures and intermediate result related APIs. | + | `DynamsoftLicense.aar` | The license library, which includes license related APIs. | + | `DynamsoftCodeParserDedicator.aar`| The code parser helper library, which includes some validation functions used by the SDK.| + +There are two ways to add the libraries into your project - **Manually** and **Maven**. + +### Add the Libraries Manually + +1. Download the SDK package from the Dynamsoft Website. After unzipping, four **aar** files can be found in the **Dynamsoft\Libs** directory: + + - **DynamsoftCodeParser.aar** + - **DynamsoftCore.aar** + - **DynamsoftLicense.aar** + - **DynamsoftCodeParserDedicator.aar** + +2. Copy the above seven **aar** files to the target directory such as `[App Project Root Path]\app\libs` + +3. Open the file `[App Project Root Path]\app\build.gradle` and add the reference in the dependencies: + + ```groovy + dependencies { + implementation fileTree(dir: 'libs', include: ['*.aar']) + } + ``` + +4. Click **Sync Now**. After the synchronization is complete, the SDK is added to the project. + +### Add the Libraries via Maven + +1. Open the file `[App Project Root Path]\app\build.gradle` and add the Maven repository: + + ```groovy + repositories { + maven { + url "https://download2.dynamsoft.com/maven/aar" + } + } + ``` + +2. Add the references in the dependencies: + + ```groovy + dependencies { + implementation 'com.dynamsoft:dynamsoftcodeparser:2.0.20' + implementation 'com.dynamsoft:dynamsoftcodeparserdedicator:1.0.10' + implementation 'com.dynamsoft:dynamsoftcore:3.0.20' + implementation 'com.dynamsoft:dynamsoftlicense:3.0.30' + } + ``` + +3. Click **Sync Now**. After the synchronization is complete, the SDK is added to the project. + +## Build Your First Application + +In this section, we are going to explain how to create a simple `HelloWorld` app for parsing text or bytes. + +>Note: +> +>- Android Studio 2022.3.1 is used here in this guide. +>- You can get similar source code from +> - HelloWorld Sample (Java) + +### Create a New Project + +1. Open Android Studio and select New Project… in the File > New > New Project… menu to create a new project. + +2. Choose the correct template for your project. In this sample, we'll use `Empty Activity`. + +3. When prompted, choose your app name (`HelloWorld`) and set the Save location, Language, and Minimum SDK (21) + >Note: With minSdkVersion set to 21, your app is available on more than 94.1% of devices on the Google Play Store (last update: March 2021). + +### Include the Library + +Add the SDK to your new project. Please read [Add the Libraries](#add-the-libraries) section for more details. + +### Initialize the License + +1. Initialize the license in the file `MainActivity.java`. + + ```java + import com.dynamsoft.license.LicenseManager; + public class MainActivity extends AppCompatActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", this, (isSuccess, error) -> { + if (!isSuccess) { + error.printStackTrace(); + } + }); + } + } + ``` + + >Note: + > + >- The license string here grants a time-limited free trial which requires network connection to work. + >- You can request for a 30-day trial license via the Customer Portal. Offline trial license is also available by contacting us. + >- If you download the Installation Package, it comes with a 30-day trial license by default. + +### Initialize Code Parser And Parse the Code Bytes + +1. Import and initialize the `CodeParser`. + + ```java + import com.dynamsoft.dcp.CodeParser; + public class MainActivity extends AppCompatActivity { + private CodeParser mParser; + @Override + protected void onCreate(Bundle savedInstanceState) { + ... + mParser = new CodeParser(this); + } + } + ``` + +2. In the Project window, open **app > res > layout > `activity_main.xml`**, create a "Parse" button control under the root node. + + ```xml +