diff --git a/programming/android/api-reference/document-type.md b/programming/android/api-reference/document-type.md index 47c6adb..f16a716 100644 --- a/programming/android/api-reference/document-type.md +++ b/programming/android/api-reference/document-type.md @@ -10,7 +10,7 @@ breadcrumbText: EnumDocumentType # EnumDocumentType -`EnumDocumentType` is a enumeration class that defines the type of document to scan, such as ID cards or passports. +`EnumDocumentType` is an enumeration class that defines the type of document to scan, such as ID cards or passports. ## Definition diff --git a/programming/android/api-reference/mrz-data.md b/programming/android/api-reference/mrz-data.md index 42810f9..8f17b77 100644 --- a/programming/android/api-reference/mrz-data.md +++ b/programming/android/api-reference/mrz-data.md @@ -26,21 +26,21 @@ class MRZData | Method | Description | | ------ | ----------- | -| [`getFirstName`](#getfirstname) | Returns the first name. | -| [`getLastName`](#getlastname) | Returns the last name. | -| [`getSex`](#getsex) | Returns the sex. | -| [`getIssuingState`](#getissuingstate) | Returns the issuing state. | -| [`getNationality`](#getnationality) | Returns the nationality. | -| [`getDateOfBirth`](#getdateofbirth) | Returns the date of birth. | -| [`getDateOfExpire`](#getdateofexpire) | Returns the date of expire. | -| [`getDocumentType`](#getdocumenttype) | Returns the type of document. | -| [`getDocumentNumber`](#getdocumentnumber) | Returns the document number. | -| [`getAge`](#getage) | Returns the age. | -| [`getMrzText`](#getmrztext) | Returns the raw text of MRZ. | +| [`getFirstName`](#getfirstname) | Returns the first name of the user of the MRZ document. | +| [`getLastName`](#getlastname) | Returns the last name of the user of the MRZ document. | +| [`getSex`](#getsex) | Returns the sex of the user of the MRZ document. | +| [`getIssuingState`](#getissuingstate) | Returns the issuing state of the MRZ document. | +| [`getNationality`](#getnationality) | Returns the nationality of the user of the MRZ document. | +| [`getDateOfBirth`](#getdateofbirth) | Returns the date of birth of the user of the MRZ document. | +| [`getDateOfExpire`](#getdateofexpire) | Returns the expiry date of the MRZ document. | +| [`getDocumentType`](#getdocumenttype) | Returns the type of MRZ document. | +| [`getDocumentNumber`](#getdocumentnumber) | Returns the MRZ document number. | +| [`getAge`](#getage) | Returns the age of the user of the MRZ document. | +| [`getMrzText`](#getmrztext) | Returns the raw text of the MRZ. | ### getFirstName -Returns the first name. +Returns the first name of the user of the MRZ document. ```java String getFirstName(); @@ -52,7 +52,7 @@ The first name. ### getLastName -Returns the last name. +Returns the last name of the user of the MRZ document. ```java String getLastName(); @@ -64,7 +64,7 @@ The last name. ### getSex -Returns the sex. +Returns the sex of the user of the MRZ document. ```java String getSex(); @@ -76,7 +76,7 @@ The sex. ### getIssuingState -Returns the issuing state. +Returns the issuing state of the MRZ document. ```java String getIssuingState(); @@ -88,7 +88,7 @@ The issuing state. ### getNationality -Returns the nationality. +Returns the nationality of the user of the MRZ document. ```java String getNationality(); @@ -100,7 +100,7 @@ The nationality. ### getDateOfBirth -Returns the date of birth. +Returns the date of birth of the user of the MRZ document. ```java String getDateOfBirth(); @@ -112,7 +112,7 @@ The date of birth. ### getDateOfExpire -Returns the date of expire. +Returns the expiry date of the MRZ document. ```java String getDateOfExpire(); @@ -120,11 +120,11 @@ String getDateOfExpire(); **Return Value** -The date of expire. +The date of expiry. ### getDocumentType -Returns the type of document. +Returns the type of MRZ document. ```java String getDocumentType(); @@ -136,7 +136,7 @@ The type of document, such as ID cards or passports. ### getDocumentNumber -Returns the document number. +Returns the MRZ document number. ```java String getDocumentNumber(); @@ -148,7 +148,7 @@ The document number. ### getAge -Returns the age. +Returns the age of the user of the MRZ document. ```java int getAge(); @@ -160,7 +160,7 @@ The age. ### getMrzText -Returns the raw text of MRZ. +Returns the raw text of the MRZ. ```java String getMrzText(); @@ -168,4 +168,4 @@ String getMrzText(); **Return Value** -The raw text of MRZ. +The raw text of the MRZ. diff --git a/programming/android/api-reference/mrz-scan-result.md b/programming/android/api-reference/mrz-scan-result.md index a5c9422..8ca6846 100644 --- a/programming/android/api-reference/mrz-scan-result.md +++ b/programming/android/api-reference/mrz-scan-result.md @@ -10,7 +10,7 @@ breadcrumbText: MRZScanResult # MRZScanResult -`MRZScanResult` is a result class that contains the parsed MRZ information from one scan and the additional information. +`MRZScanResult` is a result class that contains the parsed MRZ information and the corresponding additional information. ## Definition @@ -26,14 +26,14 @@ class MRZScanResult | Method | Description | | ------ | ----------- | -| [`getData`](#getdata) | Returns the parsed [`MRZ data`](mrz-data.md). | -| [`getResultStatus`](#getresultstatus) | Get the status of the result, which can be finished, canceled or exception. | +| [`getData`](#getdata) | Returns the parsed MRZ data. | +| [`getResultStatus`](#getresultstatus) | Returns the result status, which can be finished, canceled or exception. | | [`getErrorCode`](#geterrorcode) | Returns the error code should something go wrong during the MRZ scanning process. | | [`getErrorString`](#geterrorstring) | Returns the error message associated with the error code should something go wrong during the MRZ scanning process. | ### getData -Returns the parsed [`MRZ data`](mrz-data.md). +Returns the parsed MRZ information as a [`MRZData`](mrz-data.md) object. ```java MRZData getData(); @@ -45,7 +45,7 @@ A [`MRZData`](mrz-data.md) object that contains the parsed MRZ data. ### getResultStatus -Get the status of the result, which can be finished, canceled or exception. +Returns the status of the result, which can be finished, canceled or exception. ```java @EnumResultStatus diff --git a/programming/android/api-reference/mrz-scanner-config.md b/programming/android/api-reference/mrz-scanner-config.md index c4beb86..8e60d7e 100644 --- a/programming/android/api-reference/mrz-scanner-config.md +++ b/programming/android/api-reference/mrz-scanner-config.md @@ -26,20 +26,20 @@ final class MRZScannerConfig | Method | Description | | ------ | ----------- | -| [`setLicense`](#setlicense) | Set the license. | -| [`setTemplateFilePath`](#settemplatefilepath) | Set a path for the SDK to load template file. | -| [`setTorchButtonVisible`](#settorchbuttonvisible) | Set whether to display the torch button when scanning. Uses can click the torch button to turn on/off the torch. | -| [`setBeepEnabled`](#setbeepenabled) | Set whether to trigger a beep sound when MRZ is scanned. | -| [`setCloseButtonVisible`](#setclosebuttonvisible) | Set whether to display a button for uses to close the scanner page. | -| [`setDocumentType`](#setdocumenttype) | Specifies the type of document to scan, such as ID cards or passports. | +| [`setLicense`](#setlicense) | Sets the license string. | +| [`setTemplateFilePath`](#settemplatefilepath) | Sets the local file path for the JSON parameters template file. | +| [`setTorchButtonVisible`](#settorchbuttonvisible) | Sets whether to display the torch button when scanning. | +| [`setBeepEnabled`](#setbeepenabled) | Sets whether the beep sound is triggered or not when a MRZ is scanned. | +| [`setCloseButtonVisible`](#setclosebuttonvisible) | Sets the visibility status of the close button for users to close the scanner page. | +| [`setDocumentType`](#setdocumenttype) | Sets the type of document to scan, such as ID cards or passports. | | [`getLicense`](#getlicense) | Returns the license string. | -| [`getTemplateFilePath`](#gettemplatefilepath) | Get the file path of the template file. | -| [`isTorchButtonVisible`](#istorchbuttonvisible) | Returns whether the torch button is visible. | -| [`isBeepEnabled`](#isbeepenabled) | Returns whether the beep sound is enabled. | -| [`isCloseButtonVisible`](#isclosebuttonvisible) | Returns whether the close button is visible. | +| [`getTemplateFilePath`](#gettemplatefilepath) | Returns the local path of the settings template file. | +| [`isTorchButtonVisible`](#istorchbuttonvisible) | Returns the visibility status of the torch button. | +| [`isBeepEnabled`](#isbeepenabled) | Returns the play status of the beep sound when a MRZ is scanned. | +| [`isCloseButtonVisible`](#isclosebuttonvisible) | Returns the visibility status of the close button. | | [`getDocumentType`](#getdocumenttype) | Returns the type of document to scan, such as ID cards or passports. | -| [`isGuideFrameVisible`](#isguideframevisible) | Returns whether the guide frame is visible. | -| [`setGuideFrameVisible`](#setguideframevisible) | Set whether to display the guide frame. | +| [`isGuideFrameVisible`](#isguideframevisible) | Returns the visibility status of the guide frame on the display. | +| [`setGuideFrameVisible`](#setguideframevisible) | Sets the visibility of the guide frame on the display. | ### setLicense @@ -67,7 +67,7 @@ void setTemplateFilePath(String templateFilePath); ### setTorchButtonVisible -Set whether to display the torch button when scanning. Uses can click the torch button to turn on/off the torch. +Sets whether to display the torch button when scanning. Users can click the torch button to turn on/off the torch. ```java void setTorchButtonVisible(boolean torchButtonVisible); @@ -79,7 +79,7 @@ void setTorchButtonVisible(boolean torchButtonVisible); ### setBeepEnabled -Set whether to trigger a beep sound when a MRZ is scanned. +Sets whether the beep sound is triggered or not when a MRZ is scanned. ```java void setBeepEnabled(boolean beepEnabled); @@ -91,7 +91,7 @@ void setBeepEnabled(boolean beepEnabled); ### setCloseButtonVisible -Set whether to display a button for uses to close the scanner page. +Sets the visibility status of the close button for users to close the scanner page. ```java void setCloseButtonVisible(boolean closeButtonVisible); @@ -103,7 +103,7 @@ void setCloseButtonVisible(boolean closeButtonVisible); ### setDocumentType -Specifies the type of document to scan, such as ID cards or passports. +Sets the type of document to scan, such as ID cards or passports. ```java void setDocumentType(EnumDocumentType type); @@ -127,7 +127,7 @@ The license key to be used for initialization. ### getTemplateFilePath -Get the file path of the template file. +Returns the local path of the settings template file. ```java String getTemplateFilePath(); @@ -187,7 +187,7 @@ The type of document to scan, such as ID cards or passports. ### isGuideFrameVisible -Returns whether the guide frame is visible. +Returns the visibility status of the guide frame on the display. ```java boolean isGuideFrameVisible(); diff --git a/programming/android/user-guide/index.md b/programming/android/user-guide/index.md index 0dd1c35..2a72b00 100644 --- a/programming/android/user-guide/index.md +++ b/programming/android/user-guide/index.md @@ -16,15 +16,15 @@ This user guide will walk through the [ScanMRZ](https://github.com/Dynamsoft/mrz ## Supported Machine-Readable Travel Document Types -The Machine Readable Travel Documents (MRTD) standard specified by the International Civil Aviation Organization (ICAO) defines how to encode information for optical character recognition on official travel documents. +The Machine Readable Travel Document (MRTD) standard specified by the International Civil Aviation Organization (ICAO) defines how to encode information for optical character recognition on official travel documents. Currently, the SDK supports three types of MRTD: -> Note: If you need support for other types of MRTDs, our SDK can be easily customized. Please contact the [Dynamsoft Support Team](https://www.dynamsoft.com/contact/). +> Note: If you need support for other types of MRTDs, our SDK can be easily customized. Please contact the [Dynamsoft Support Team](https://www.dynamsoft.com/contact/) if you have such a request. ### ID (TD1 Size) -The MRZ (Machine Readable Zone) in TD1 format consists of 3 lines, each containing 30 characters. +The MRZ (Machine Readable Zone) in TD1 format consists of 3 lines with 30 characters in each line.
Example of MRZ in TD1 format @@ -32,7 +32,7 @@ The MRZ (Machine Readable Zone) in TD1 format consists of 3 lines, each containi ### ID (TD2 Size) -The MRZ (Machine Readable Zone) in TD2 format consists of 2 lines, with each line containing 36 characters. +The MRZ (Machine Readable Zone) in TD2 format consists of 2 lines with 36 characters in each line.
Example of MRZ in TD2 format @@ -40,7 +40,7 @@ The MRZ (Machine Readable Zone) in TD2 format consists of 2 lines, with each li ### Passport (TD3 Size) -The MRZ (Machine Readable Zone) in TD3 format consists of 2 lines, with each line containing 44 characters. +The MRZ (Machine Readable Zone) in TD3 format consists of 2 lines with 44 characters in each line.
Example of MRZ in TD2 format @@ -92,13 +92,49 @@ The first thing that we are going to do is to create a fresh new project. Here a ## Step 2: Include the Library -Add the SDK to your new project. Please read [Add the SDK](#add-the-sdk) section for more details. +Please read [Add the SDK](#add-the-sdk) section for instructions on how to add the SDK to your Android project. -## Step 3: Initialize the License +## Step 3: Get Prepare for the Layout File + +Open your **activity_main.xml** and replace it with the following code. In the layout file, we prepared 2 UI elements: + +- A `TextView` for displaying the MRZ scanning result. +- A "START SCANNING" button for opening the scanner view. + +```xml + + + + + +