BT-A700 Series Application Development Guide: Handheld Mobile Computer

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

847GB

Handheld Mobile Computer

BT-A700 Series
Application Development
Guide
Version 2.00
Table of Contents

Related Manuals ......................................................................................................................... 3


Software License Agreement .................................................................................................... 4

1.1. Features ............................................................................................................................. 5


1.2. System Overview .............................................................................................................. 5

2.1. Installation and Setup of Android Studio ........................................................................ 6

2.2. Debugging in Android Studio ........................................................................................ 10

3.1. Read Control Library ...................................................................................................... 18

3.2. Notification Control Library ........................................................................................... 44

3.3. Device Information Library ............................................................................................. 48

2 / 50
Introduction
This manual describes the BT-A700 device system, Android™ operations, and basic device specifications.

・ IEEE802.11a/b/g/n/ac is the Wireless LAN standard defined by the 802 committee, which develops the LAN
technology standards in IEEE (Institute of Electrical and Electronics Engineers).
・ The Bluetooth® word mark and logo are owned by the Bluetooth SIG, Inc., and any use of such marks by
KEYENCE is under license. Other trademarks and trademark names are those of the respective owners.
・ microSD, SDHC, and SDXC are trademarks of SD Association.
・ The official name of Windows is Windows® operating system.
・ The screenshots in this manual are used in compliance with the guidelines of the Microsoft Corporation.
・ "Google", "Google" logo, "Google Map", "Chromecast", "Google Play", "Google Play" logo, "Android", "Android"
logo, "YouTube", "YouTube" logo, and "Gmail" are trademarks or registered trademarks of Google LLC.
・ Wi-Fi® and Wi-Fi Direct® are registered trademarks of Wi-Fi Alliance®.
・ WPA™ and WPA2™ are trademarks of Wi-Fi Alliance®.
・ All other company names and product names used in this manual are registered trademarks or trademarks of
their respective companies.
・ It is prohibited to use or copy all or any part of this manual without prior approval.

Related Manuals
Read the following manuals before using the BT-A700.

Manual type Manual description


Describes the specifications, part names, package, precautions for use,
Instruction Manual
operating procedures, and dimensions of the BT-A700.
Software Settings / Operation Describes the specifications of the device software functions. See this manual
Manual for the basic OS operations, device specifications, and embedded software.

Describes flow from SDK installation to actual operation and use of the device
Application Development Guide
libraries. This must be read before developing an application for the BT-A700.

Enterprise Browser Settings / Describes how to use the Enterprise Browser, unique to the BT-A700, and
Operation Manual information about the Extended JavaScript Library.
Describes the procedure for reading character strings using the BT-A700 and
Character Recognition Reading
the specifications related to reading character strings. Read this manual first
Settings / Operation Manual
when checking the reading of character strings.

3 / 50
Software License Agreement
NOTICE TO USER: PLEASE READ THIS SOFTWARE LICENSE AGREEMENT (THIS “AGREEMENT”)
CAREFULLY. BY USING ALL OR ANY PORTION OF THE [BT-A700 SERIES] (THIS “SOFTWARE”), YOU ARE
AGREEING TO BE BOUND BY ALL THE TERMS AND CONDITONS OF THIS AGREEMENT. IF YOU DO NOT
AGREE TO ANY TERMS OF THIS AGREEMENT, DO NOT USE THIS SOFTWARE.

1. Definition
1.1 “use” or “using” means to access, install, download, copy or otherwise benefit from using the functionality of
this Software.
1.2 “This Software” means the software and all associated documentation provided by KEYENCE.

2. Grant of License.
Conditioned upon compliance with all of the terms and conditions of this Agreement, KEYENCE grants you a
nonexclusive and nontransferable license to install this Software on all computers used by your entity in order to
use the KEYENCE product. You may make one copy of this Software for backup or archive purposes only.

3. Restrictions.
3.1 Except for installation of updates or new functions provided by KEYENCE, you may not modify or add any
function to this Software.
3.2 You may not reverse engineer, decompile or disassemble this Software.
3.3 You may not create derivative works based on this Software.
3.4 Other than expressly stated by KEYENCE, you may not resell, retransfer, rent or otherwise redistribute this
Software to any third parties.

4. Intellectual Property Rights.


Except as expressly stated herein, KEYENCE reserves all right, title and interest in this Software, and all
associated copyrights, trademarks, and other intellectual property rights therein.

5. Disclaimer.
Keyence is licensing this Software to you “AS IS” and without any warranty of any kind. In no event will KEYENCE
or its suppliers be liable to you for any damages, claims, costs or any lost profits caused by using this Software.

6. Termination.
6.1 Your license under this Agreement will terminate automatically if you destroy this Software and the copy of this
Software in your possession or voluntarily return this Software to us.
6.2 Your license under this Agreement will terminate automatically without any notice from KEYENCE if you fail to
comply with any of the terms and conditions of this Agreement. Promptly upon termination, you shall cease all
use of this Software and destroy all copies, full or partial, of this Software in your possession or control.
6.3 You will compensate KEYENCE for costs or any lost profits caused by your violation or breach of any term of
this Agreement.

7. Governing Law.
7.1 This Agreement will be governed by and construed in accordance with the substantive laws of Japan without
regards to the principles of conflicts of law.
7.2 If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of this
Agreement, which shall remain valid and enforceable according to its terms and conditions.

4 / 50
Overview
1.1. Features
The BT-A700 is an Android OS-based mobile computer. The BT-A700 uses Android Studio, Google’s official
integrated development environment, to develop and debug applications.

1.2. System Overview


Possible device configurations for the BT-A700 are shown below.

[Wireless LAN] [Communication/charging unit]


USB

LAN

PC Access point PC
IEEE802.11 a/b/g/n/ac
[microSD card]
[Bluetooth]

PC Mobile printer

5 / 50
Setting Procedure
2.1. Installation and Setup of Android Studio
Installing Android Studio
To develop a BT-A700 application using the device libraries, you need Android Studio. Download the installer to
the PC from the Google website.
* In this manual, version 4.1.1 is used. The screen or operation may be different depending on the Android
Studio version.

1. Execute the downloaded Android Studio installer.

2. Select the components to install.


"Android Virtual Device" is required to debug in a virtual environment on the PC, instead of the actual
device.

3. Finish the installation according to the instructions.

6 / 50
Setting Up on First Launch
When you launch Android Studio for the first time, the first-time setup screen appears.

1. A screen appears for you to check whether to import the Android Studio settings of the previous version.
After selecting one of the options, click the [OK] button to proceed with the setup.
"Custom location. Config folder or installation home of the previous version": Imports the previous settings.

"Do not import settings": Select this if you are installing Android Studio for the first time.

2. Finish the setup according to the instructions.

7 / 50
Creating a Project
If you are launching Android Studio for the first time, the "Welcome to Android Studio" window appears.

1. To create a new Android application, select "Create New project".

2. When the "Select a Project Template" window appears, select an activity from "Phone and Tablet" tab. In
this manual, "Empty Activity" is selected.

3. When the "Configure your project" window appears, set a new project name and its path. For "Language",
select "Java". For "Minimum API level", select according to the OS version of the BT-A700.

4. If you are creating a project for the first time, the required components will be downloaded.
* An internet connection is required.
After the components finish downloading, click the “Finish” button.

8 / 50
Importing the Device Library (.jar File)
To use the BT-A700-specific functions, import the device libraries (.jar File) to the project.

1. Copy the sdk.jar to a folder that can be referenced by the Android project.
Example: [Application name]¥app¥libs

2. Select [File] - [Project Structure] in Android Studio to display the settings screen.
3. Select [Dependencies] from the left side of the setting screen and select the module library to use.

4. Click the [+] button on [Declared Dependencies] and select [2 Jar dependency].

5. Select sdk.jar copied in step 1.

9 / 50
2.2. Debugging in Android Studio
Debugging with the Android Emulator
You can run the application execution test on the PC using the Android Emulator supplied by Android Studio.
Note: The BT-A700 device libraries, such as “barcode reading”, will not function here.

1. From the Android Studio menu bar, select "Run" > "Run 'app'".

2. When you debug using Android Emulator for the first time, press [Tools] -> [AVD Manager] -> [Create Virtual
Device] to create a new virtual device.

3. Press the [New Hardware Profile] button to create a new virtual image hardware configuration.

10 / 50
4. The "Configure Hardware Profile" screen now appears. Configure the operating system version and screen
settings according to your BT-A700.

 Device Name: Name to identify the device.


 Device Type: Device type. Select "Phone/Tablet".
 Screen
 Screen size: Inch-based screen size. Enter "5.0".
 Resolution: Pixel-based screen resolution. Enter "720" in the left field and "1280" in the right
field.
 Memory: Main memory size. Enter "3" and select "GB".

Click the "Finish" button to add the new hardware configuration. When you return to the "System Image"
screen, select the created hardware configuration and click the "Next" button.

5. Select the correct OS based on the OS version of the BT-A700.


* You only need to download the image the first time you use it.

11 / 50
6. The required components will be downloaded and installed. After the download and installation, click the
"Finish" button to close.

7. When you return to the "System Image" screen, select the created operating system image.

12 / 50
8. Enter the name to identify the virtual device in "AVD Name".

9. The created virtual device is now displayed. Select this device.

10. When the virtual device is started and the application is displayed, the debugging has succeeded.

13 / 50
How to Debug on an Actual Device (USB)
Use the USB cradle to debug on an actual device.

1. Enable the developer options in the Android settings on the device.


Select "Settings" > "System" > "About phone" and tap "Build number" seven times to enable the developer
options.

Tap 7 times

With the device firmware Ver. 02.00.01 or later, to enable Developer Options, tap the Build number seven
times in Application list>Settings>Device Information.

2. Enable USB debugging in the Developer options.


Select "Settings" > "System" > "Advanced" > "Developer options" and enable "USB degugging".

Tap OK to permit if the following screen appears.

14 / 50
3. Select Tools > SDK Manager in Android Studio and acquire the Google USB Driver from “SDK Tools”.
The USB driver is stored in the "extras\google\usb_driver" folder in "Android SDK Location".

4. Place the BT-A700 on the cradle to connect via USB.

5. Open up the control panel and go to “Device Manager”. When the “SDA660-MTP xxxxxxxxx” is shown in
“Other Devices” or “Universal Serial Bus devices”, right-click it and select “Update Driver Software”.

6. Select "Browse my computer for driver software".

15 / 50
7. Click the [Browse] button, select the USB driver folder with the path checked in step 2, and click the [Next]
button.
"<Android SDK Location path>\extras\google\usb_driver"

8. When the message appears, click the [Install] button to continue.

9. The following screen appears when the installation is complete. Click the [Close] button.

10. When the actual device and development PC are connected via USB, and the USB connection is permitted
on the device, the device name is displayed in the "Select Deployment Target" dialog box.
Select the device where the application runs and click the [OK] button.

16 / 50
How to Debug on an Actual Device (Wireless)
Debugging can also be performed via wireless LAN. To debug via wireless LAN, you need to connect the
device to the PC via USB cradle. For details on how to connect via USB, see "2.2.2. How to Debug on an
Actual Device (USB)".

1. To open the"SDK Manager", select "Tools" > "SDK Manager" from the Android Studio menu bar.

2. Check the Android SDK installation path in "Android SDK Location". Make sure the Android SDK, including
the ADB commands, has been installed in the "platform-tools" folder under this path.

3. Execute the following commands in the command prompt:

 cd "<Android SDK Location path>¥platform-tools"

 adb tcpip 5555

 adb connect {Device IP address}:5555

When you execute the application in Android Studio, it will be displayed on the device with the specified IP
address.

17 / 50
Device Library Function Details
3.1. Read Control Library
Example of Using the Read Control Library
This section describes how to use the code reading library.

3.1.1.1. Starting and Finishing the Read Control


Use the ScanManager class. Use createScanManager() to create and acquire an instance at the start of control
and call releaseScanManager() at the end to release the resources.

Example
// Import the ScanManager class.
import com.keyence.autoid.sdk.scan.ScanManager;

public class MainActivity extends AppCompatActivity {


// Define the ScanManager class variables.
private ScanManager mScanManager;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Create a ScanManager class instance.
// From here on, you can control reading using mScanManager.
mScanManager = ScanManager.createScanManager(this);
}

@Override
protected void onDestroy() {
super.onDestroy();
// Discard the ScanManager class instance to release the resources.
mScanManager.releaseScanManager();
}
}

18 / 50
3.1.1.2. Acquiring and Changing the Reading Settings
Use getConfig() to acquire the settings and setConfig() to apply the settings.

Example 1: Acquire the current setting values and change the settings
private boolean testSetCodeTypeExample1(){
// Define a variable to store the code type.
CodeType codeType = new CodeType();

// Acquire the current setting values.


SdkStatus status = mScanManager.getConfig(codeType);
if (status == SdkStatus.SUCCESS){
}
// Change the setting values.
// Disable JAN code reading and enable QR code reading
codeType.upcEanJan = false;
codeType.qrCode = true;

// Apply the setting values.


status = mScanManager.setConfig(codeType);
if (status == SdkStatus.SUCCESS){
}
}

Example 2: Create a new parameter and configure the settings


private boolean testSetCodeTypeExample2(){
// Define a variable to store the code type.
QrCode qrParam = new QrCode();

// Reset the setting values to the default system values.


qrParam.setDefault();

// Change the setting values.


qrParam.minLength = 3;
qrParam.maxLength = 30;

// Apply the setting values.


SdkStatus status = mScanManager.setConfig(qrParam);
if (status == SdkStatus.SUCCESS){
}
}

3.1.1.3. Starting and Stopping Reading


Use startRead() to start reading. When the set read stop conditions (code reading, timeout, etc.) are met or
stopRead() is used, reading is stopped.

Example
// Start reading.
mScanManager.startRead();

// Acquire the reading status.


if (mScanManager.isReading() == true) {
// Stop reading.
mScanManager.stopRead();
}

19 / 50
3.1.1.4. Acquiring the Read Event
Use the ScanManager.DataListener interface. By registering a callback event with addDataListener(), you can
acquire the reading result as an onDataReceived event.

Example
// Import the necessary classes.
import com.keyence.autoid.sdk.scan.DecodeResult;
import com.keyence.autoid.sdk.scan.ScanManager;

// Add an event listener.


public class MainActivity extends AppCompatActivity implements ScanManager.DataListener {
private ScanManager mScanManager;

// Create a read event.


@Override
public void onDataReceived(DecodeResult decodeResult) {
// Acquire the reading result.
DecodeResult.Result result = decodeResult.getResult();

// Acquire the read code type.


String codeType = decodeResult.getCodeType();

// Acquire the read data.


String data = decodeResult.getData();
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

// Create a ScanManager class instance.


mScanManager = ScanManager.createScanManager(this);
// Create a listener to receive a read event.
mScanManager.addDataListener(this);
}

@Override
protected void onDestroy() {
super.onDestroy();

// Discard the ScanManager class instance.


mScanManager.removeDataListener(this);
// Discard the ScanManager class instance to release the resources.
mScanManager.releaseScanManager();
}
}

20 / 50
ScanManager Class

3.1.2.1. createScanManager()
[Function] Creates a read control instance. Call this first when performing read control. When reading no
longer becomes necessary, like after the application is closed, call releaseScanManager() to
release the resources. It may take about 30 seconds immediately after restart.

[Format] static ScanManager createScanManager(android.content.Context context)

[Argument] context Application context

[Return value] ScanManager instance. When the ScanManager instance fails, null is returned.

3.1.2.2. releaseScanManager()
[Function] Releases the resources of the read control instance. Call this when read control no longer
becomes necessary like after the application is closed.

[Format] void releaseScanManager()

[Argument] None

[Return value] None

3.1.2.3. setConfig()
[Function] Configures the detailed settings of the read code type.

[Format] SdkStatus setCodeParams (Read parameter class p)

[Argument] Read parameter class


Reading setting (See "3.1.5. Read Parameter Class List")

[Return value] SdkStatus.SUCCESS Process success


SdkStatus.FAIL Process failure
SdkStatus.INVALID_PARAM Error: Invalid parameter
SdkStatus.ALREADY_EXIST Error: Already existing
SdkStatus.NOT_PERMIT Error: Not permitted
SdkStatus.NOT_SUPPORT Error: Not supported

21 / 50
3.1.2.4. getConfig()
[Function] Acquires the detailed settings of the read code type.

[Format] SdkStatus getCodeParams (Read parameter class p)

[Argument] Read parameter class


Reading setting (See "3.1.5. Read Parameter Class List")

[Return value] SdkStatus.SUCCESS Process success


SdkStatus.FAIL Process failure
SdkStatus.INVALID_PARAM Error: Invalid parameter
SdkStatus.ALREADY_EXIST Error: Already existing
SdkStatus.NOT_PERMIT Error: Not permitted
SdkStatus.NOT_SUPPORT Error: Not supported

3.1.2.5. lockScanner()
[Function] Stops the reading function. While the function is stopped, even if you press the trigger key, the
LED does not emit illumination, preventing from reading.
In addition, setConfig() or changing settings on the Settings screen results in an error.

[Format] boolean lockScanner()

[Argument] None

[Return value] true Success


false Failure, or the device is already stopped.

3.1.2.6. unlockScanner()
[Function] Restores the reading function.

[Format] boolean unlockScanner()

[Argument] None

[Return value] true Success


false Failure, or the device is not stopped.

3.1.2.7. startRead()

[Function] Starts reading using the soft trigger.

[Format] SdkStatus startRead()

[Argument] None

[Return value] SdkStatus.SUCCESS Process success


SdkStatus.FAIL Process failure
SdkStatus.INVALID_PARAM Error: Invalid parameter
SdkStatus.ALREADY_EXIST Error: Already existing
SdkStatus.NOT_PERMIT Error: Not permitted
SdkStatus.NOT_SUPPORT Error: Not supported

22 / 50
3.1.2.8. stopRead()
[Function] Stops reading using the soft trigger.

[Format] void stopRead()

[Argument] None

[Return value] None

3.1.2.9. isReading()
[Function] Checks whether reading is in progress or not.

[Format] boolean isReading()

[Argument] None

[Return value] true Reading in progress


false Reading stopped

3.1.2.10. addDataListener()
[Function] Registers an object to receive the reading result notification as a callback event. A callback
event can be received as an onDataReceived event.

[Format] SdkStatus addDataListener(ScanManager.DataListener listener)

[Argument] listener Object to receive a callback

[Return value] None

3.1.2.11. removeDataListener()
[Function] Deletes the registered callback event of the reading result data.

[Format] SdkStatus removeDataListener(ScanManager.DataListener listener)

[Argument] listener Object registered with addDataListener

[Return value] SdkStatus.SUCCESS Process success


SdkStatus.FAIL Process failure
SdkStatus.INVALID_PARAM Error: Invalid parameter
SdkStatus.ALREADY_EXIST Error: Already existing
SdkStatus.NOT_PERMIT Error: Not permitted
SdkStatus.NOT_SUPPORT Error: Not supported

23 / 50
3.1.2.12. sendData()
[Function] Outputs the character string with the InputConnection method. (Supported by device firmware
Ver. 02.00.01 or later)

[Format] SdkStatus sendData(String text, int keyCode, int metaState)

[Argument] text Character string to output


keyCode Key code to add after outputting the character string
mataState Key code modification key

[Return value] SdkStatus.SUCCESS Process success


SdkStatus.FAIL Process failure
SdkStatus.INVALID_PARAM Error: Invalid parameter
SdkStatus.ALREADY_EXIST Error: Already existing
SdkStatus.NOT_PERMIT Error: Not permitted
SdkStatus.NOT_SUPPORT Error: Not supported

3.1.2.13. sendDataWithEditorAction()
[Function] Outputs the character string with the InputConnection method and outputs the EditorAction
after the character string. (Supported by device firmware Ver. 02.00.01 or later)

[Format] SdkStatus sendDataWithEditorAction(String text)

[Argument] text Character string to output

[Return value] SdkStatus.SUCCESS Process success


SdkStatus.FAIL Process failure
SdkStatus.INVALID_PARAM Error: Invalid parameter
SdkStatus.ALREADY_EXIST Error: Already existing
SdkStatus.NOT_PERMIT Error: Not permitted
SdkStatus.NOT_SUPPORT Error: Not supported

24 / 50
ScanManager.DataListener Interface
This is an interface to receive the reading result as a callback event.

3.1.3.1. onDataReceived()
[Function] Callback event is called at the end of reading.

[Format] void onDataReceived(DecodeResult decodeResult)

[Argument] decodeResult Decode result

DecodeResult Class
This class retains the reading result. The reading result contains read success/failure and read data. This is
used to acquire the reading result using the DataListener interface.

3.1.4.1. getResult()
[Function] Returns the reading result.

[Format] DecodeResult.Result getResult()

[Argument] None

[Return value] DecodeResult.Result.SUCCESS Read success


DecodeResult.Result.ALERT Alert occurrence (OCR only)
DecodeResult.Result.TIMEOUT Timeout
DecodeResult.Result.CANCELED Read cancel
DecodeResult.Result.FAILED Other failure

25 / 50
3.1.4.2. getCodeType()
[Function] Acquires the code type of the read data.

[Format] String getCodeType()

[Argument] None

[Return value] Code type of the read data "UPC/EAN/JAN"


"Code128"
"Code39"
"ITF"
"GS1 DataBar"
"Datamatrix"
"QRCode"
"PDF417"
"Industrial 2of5"
"Codabar(NW7)"
"COOP2of5"
"Code93"
"Composite AB(GS1-Databar)"
"Composite AB(EAN/UPC)"
"Composite (GS1-128)"
"Postal"

3.1.4.3. getData()
[Function] Returns the read data as a character string.

[Format] String getData()

[Argument] None

[Return value] Character string of the read data

3.1.4.4. getRawData()
[Function] Acquires the read data as byte data.

[Format] byte[] getRawData()

[Argument] None

[Return value] Byte data of the read data

26 / 50
Read Parameter Class List
This section describes the parameter classes that can be set or acquired with
ScanManager.setConfig()/getConfig().

3.1.5.1. Parameter Class List


Class name Description
ScanParams class Parameter class for the reading settings
CodeType class Parameter class for the reading target code types
DataFormat class Parameter class for the data format settings of the reading result
DataOutput class Parameter class for the data output settings of the reading result
UserFeedback class Parameter class for the user feedback settings
UpcEanJan class Parameter class for UPC/EAN/JAN
Code128 class Parameter class for Code128
Code39 class Parameter class for Code39
Itf class Parameter class for ITF
Gs1Databar class Parameter class for GS1 DataBar
Datamatrix class Parameter class for Datamatrix
QrCode class Parameter class for QRCode
Pdf417 class Parameter class for PDF417
Industrial2Of5 class Parameter class for Industrial 2of5
CodabarNw7 class Parameter class for Codabar(NW7)
Coop2Of5 class Parameter class for COOP2of5
Code93 class Parameter class for Code93
CompositeGs1_128 class Parameter class for Composite (GS1-128)
Postal class Parameter class for Postal
Ocr class Parameter class for OCR

27 / 50
3.1.5.2. Property List
ScanParams class: Read behavior settings

ScanParams.trigger: Trigger behavior settings


Property Setting value (Default: Bold)
Trigger.TriggerMode.NORMAL : Normal
triggerMode
Trigger.TriggerMode.CONTINUOUS : Continuous
: Mode
Trigger.TriggerMode.TRIGGER_AT_RELEASE : Trigger at release
continuousMode.redundancyTimeout
0 to 25000 (milliseconds) (Default: 2000)
: Redundancy timeout
continuousMode.successCodesCounter.enable true : Enable
: Use Continuous Count false : Disable
continuousMode.successCodesCounter.count
2 to 16 (times) (Default: 2)
: Continuous Count
scannerTimeout
1 to 25 (seconds) (Default: 25)
: Scanning timeout

ScanParams.aimer: Target behavior settings


Property Setting value (Default: Bold)
Aimer.CenterPointReading.DISABLE
: Disable
centerPointReading Aimer.CenterPointReading.ALWAYS_ENABLE
: Center point reading : Always enable
Aimer.CenterPointReading.ENABLE_WHEN_PREAIMER
: Enable when pre-aimer
scanningFormat
Any character string (up to 1024 characters) (Default: "")
: Scanning data format
aimerTimeout
1 to 25 (seconds) (Default: 25)
: Aimer timeout

ScanParams.decoder: Decode settings


Property Setting value (Default: Bold)

Decoder.ColorInversion.BLACK_ON_WHITE : Black on white


colorInversion
Decoder.ColorInversion.WHITE_ON_BLACK : White on black
: Color inversion
Decoder.ColorInversion.AUTO : Automatic

mirrorInversion Decoder.MirrorInversion.DISABLE : Disable


: Mirror inversion Decoder.MirrorInversion.INVERSION : Inversion
illuminationLed true : Enable
: Illumination LED false : Disable
scanningLevel Decoder.ScanningLevel.NORMAL : Normal
: Scanning level Decoder.ScanningLevel.HARD : Hard
Decoder.FilterSetting.DISABLE : Disable
Decoder.FilterSetting.EXPAND_BLACK_WEAK : Expand (Weak)
Decoder.FilterSetting.SHRINK_BLACK_WEAK : Shrink (Weak)
filterSetting
Decoder.FilterSetting.NOISE_REDUCE_WEAK : Mean (Weak)
: Filter setting
Decoder.FilterSetting.EXPAND_BLACK_STRONG : Expand (Strong)
Decoder.FilterSetting.SHRINK_BLACK_STRONG : Shrink (Strong)
Decoder.FilterSetting.NOISE_REDUCE_STRONG : Mean (Strong)
checkCount
1 to 5 (times) (Default: 1)
:Check count

28 / 50
CodeType class: Read code type settings
Property Setting value (Default: Bold)
upcEanJan true : Enable
: UPC/EAN/JAN readability false : Disable
code128 true : Enable
: CODE128 readability false : Disable
code39 true : Enable
: CODE39 readability false : Disable
itf true : Enable
: ITF readability false : Disable
gs1DataBar true : Enable
: GS1 Databar readability false : Disable
datamatrix true : Enable
: Datamatrix readability false : Disable
qrCode true : Enable
: QR code readability false : Disable
pdf417 true : Enable
: PDF417 readability false : Disable
industrial2Of5 true : Enable
: Industrial2of5 readability false : Disable
codabarNw7 true : Enable
: NW7(Codabar) readability false : Disable
coop2Of5 true : Enable
: COOP2of5 readability false : Disable
code93 true : Enable
: CODE93 readability false : Disable
compositeAb_Gs1Databar true : Enable
: Composite AB(GS1-Databar) readability false : Disable
compositeAb_EanUpc true : Enable
: Composite AB(EAN/UPC) readability false : Disable
composite_Gs1_128 true : Enable
: Composite (GS1-128) readability false : Disable
postal true : Enable
: Postal code readability false : Disable
ocr true : Enable
: OCR code readability false : Disable
UPC/EAN/JAN class: Read code type settings
Property Setting value (Default: Bold)
eanJan13Support true : Enable
: EAN/JAN-13 support false : Disable
eanJan8Support true : Enable
: EAN/JAN-8 support false : Disable
upcE0Support true : Enable
: UPC-E0 support false : Disable
enableUpcE1 true : Enable
: UPC-E1 support false : Disable
addNumberSystemToUpcE true : Enable
: Add "number system" to UPC-E false : Disable
supplemental2 true : Enable
: 2-digit supplemental false : Disable
supplemental5 true : Enable
: 5-digit supplemental false : Disable
ignoreUpcWithoutSupplemental true : Enable
: Ignore UPC without supplemental false : Disable
gtin14DigitsOutput true : Enable
: GTIN 14 digits output false : Disable

29 / 50
Property Setting value (Default: Bold)
convertUpcAToEan13 true : Enable
: Convert UPC-A to EAN13 false : Disable
convertUpcEToUpcA true : Enable
: Convert UPC-E to UPC-A false : Disable
convertEan8ToEan13 true : Enable
: Convert EAN8 to EAN13 false : Disable
shortMargin true : Enable
: Short margin false : Disable
decodeMatchCount
2 to 8 (times) (Default: 2)
: Decode match count

Code128 class: Code128 parameters


Property Setting value (Default: Bold)
minLength
1 to 100 (number of digits) (Default: 1)
: Min length
maxLength
1 to 100 (number of digits) (Default: 100)
: Max length
separatorCode
0 to 255 (Specify with ASCII codes) (Default: 32 (Space))
: Separator code
Code128.DecodeType.PLAIN_CODE128 : Code128 only
type
Code128.DecodeType.GS1_128 : GS1-128 only
: Type
Code128.DecodeType.BOTH : Code128 and GS1-128
shortMargin true : Enable
: Short margin false : Disable
decodeMatchCount
2 to 8 (times) (Default: 2)
: Decode match count

Code39 class: Code39 parameters


Property Setting value (Default: Bold)
minLength
3 to 50 (number of digits) (Default: 3)
: Min length
maxLength
3 to 50 (number of digits) (Default: 50)
: Max length
verifyCheckDigit true : Enable
: Verify check digit false : Disable
reportCheckDigit true : Enable
: Report check digit false : Disable
reportStartStopCode true : Enable
: Report start/stop code false : Disable
fullAsciiConversion true : Enable
: Full ASCII conversion false : Disable
shortMargin true : Enable
: Short margin false : Disable
decodeMatchCount
2 to 8 (times) (Default: 2)
: Decode match count

30 / 50
Itf class: ITF parameters
Property Setting value (Default: Bold)
minLength
2 to 50 (number of digits) (Default: 6)
: Min length
maxLength
2 to 50 (number of digits) (Default: 50)
: Max length
verifyCheckDigit true : Enable
: Verify check digit false : Disable
reportCheckDigit true : Enable
: Report check digit false : Disable
shortMargin true : Enable
: Short margin false : Disable
decodeMatchCount
2 to 8 (times) (Default: 2)
: Decode match count

Gs1Databar class: GS1 DataBar parameters


Property Setting value (Default: Bold)
minLength
1 to 77 (number of digits) (Default: 1)
: Min length
maxLength
1 to 77 (number of digits) (Default: 77)
: Max length
gs1DatabarExpanded true : Enable
:GS1 Databar Expanded Readability false : Disable
gs1DatabarExpandStacked true : Enable
:GS1 Databar Expanded Stacked Readability false : Disable
gs1DatabarExpandStackedMinNumberOfRows
2 to 11 (number of digits) (Default: 2)
:Minimum rows of GS1 Databar Expand Stacked
gs1DatabarExpandStackedMaxNumberOfRows
2 to 11 (number of digits) (Default: 11)
:Maximum rows of GS1 Databar Expand Stacked
gs1DatabarLimited true : Enable
:GS1 Databar Limited false : Disable
gs1Databar true : Enable
:GS1 Databar false : Disable
gs1DatabarStacked true : Enable
:GS1 Databar Stacked false : Disable
decodeMatchCount
2 to 8 (times) (Default: 2)
: Decode match count

Datamatrix class: Datamatrix parameters


Property Setting value (Default: Bold)
minLength
1 to 3116 (number of digits) (Default: 1)
: Min length
maxLength
1 to 3116 (number of digits) (Default: 3116)
: Max length
rectangular true : Enable
: Rectangular false : Disable
eci
: ECI output true : Enable
(Supported by device firmware Ver. 02.00.01 or false : Disable
later)

31 / 50
QrCode class: QRCode parameters
Property Setting value (Default: Bold)
minLength
1 to 7089 (number of digits) (Default: 1)
: Min length
maxLength
1 to 7089 (number of digits) (Default: 7089)
: Max length
microQr true : Enable
: MicroQR false : Disable
eci
: ECI output true : Enable
(Supported by device firmware Ver. 02.00.01 or false : Disable
later)

Pdf417 class: PDF417 parameters


Property Setting value (Default: Bold)
minLength
1 to 50 (number of digits) (Default: 4)
: Min length
maxLength
1 to 50 (number of digits) (Default: 50)
: Max length
Pdf417.DecodeType.PDF417 : PDF417 only
type
Pdf417.DecodeType.MICRO_PDF : MicroPDF only
: Type
Pdf417.DecodeType.BOTH : PDF and MicroPDF

Industrial2Of5 class: Industrial 2of5 parameters


Property Setting value (Default: Bold)
minLength
1 to 50 (number of digits) (Default: 4)
: Min length
maxLength
1 to 50 (number of digits) (Default: 50)
: Max length
verifyCheckDigit true : Enable
: Verify check digit false : Disable
reportCheckDigit true : Enable
: Report check digit false : Disable
shortMargin true : Enable
: Short margin false : Disable
decodeMatchCount
2 to 8 (times) (Default: 3)
: Decode match count

CodabarNw7 class: Codabar(NW7) parameters


Property Setting value (Default: Bold)
minLength
3 to 50 (number of digits) (Default: 4)
: Min length
maxLength
3 to 50 (number of digits) (Default: 50)
: Max length
CodabarNw7.CheckDigitType.DISABLE
: Disable
CodabarNw7.CheckDigitType.MODULUS16
: Modulus16
checkDigitType CodabarNw7.CheckDigitType.MODULUS11
: Verify check digit : Modulus11
CodabarNw7.CheckDigitType.MODULUS11A
: Modulus11-A
CodabarNw7.CheckDigitType.MODULUS10_2WEIGHT
: Modulus10/2weight

32 / 50
Property Setting value (Default: Bold)
CodabarNw7.CheckDigitType.MODULUS10_3WEIGHT
: Modulus10/3weight
CodabarNw7.CheckDigitType.SEVEN_CHECK_DR
: 7DR
CodabarNw7.CheckDigitType.LUHN
: Luhn
reportCheckDigit true : Enable
: Report check digit false : Disable
CodabarNw7.ReportStartStopCode.NONE
: Disable
reportStartStopCode CodabarNw7.ReportStartStopCode.LOWER_CASE
: Report start/stop code : lowercase
CodabarNw7.ReportStartStopCode.UPPER_CASE
: UPPERCASE
clsiConversion true : Enable
: CLSI conversion false : Disable
shortMargin true : Enable
: Short margin false : Disable
decodeMatchCount
2 to 8 (times) (Default: 2)
: Decode match count

Coop2Of5 class: COOP2of5 parameters


Property Setting value (Default: Bold)
minLength
1 to 50 (number of digits) (Default: 4)
: Min length
maxLength
1 to 50 (number of digits) (Default: 50)
: Max length
shortMargin true : Enable
: Short margin false : Disable
decodeMatchCount
2 to 8 (times) (Default: 3)
: Decode match count

Code93 class: Code93 parameters


Property Setting value (Default: Bold)
minLength
1 to 50 (number of digits) (Default: 1)
: Min length
maxLength
1 to 50 (number of digits) (Default: 50)
: Max length
shortMargin true : Enable
: Short margin false : Disable
decodeMatchCount
2 to 8 (times) (Default: 2)
: Decode match count

CompositeGs1_128 class: Composite (GS1-128) parameters


Property Setting value (Default: Bold)
CcAbcGs1_128Comp.DecodeType.CC_A_B : CC A/B
type
CcAbcGs1_128Comp.DecodeType.CC_C : CC C
: Type
CcAbcGs1_128Comp.DecodeType.CC_A_B_C : CC A/B/C

33 / 50
Postal class: Postal parameters
Property Setting value (Default: Bold)
minLength
1 to 31 (number of digits) (Default: 1)
: Min length
maxLength
1 to 31 (number of digits) (Default: 31)
: Max length
intelligentMailBarcodes true : Enable
:Intelligent Mail Barcodes false : Disable
japanPostCodes true : Enable
: Japan Post Codes false : Disable

34 / 50
Ocr class : OCR reading settings
Ocr.ocrTarget : Character reading target settings
Property Setting value (Default: Bold)
substringCounts :
1 to 4 (Default: 1)
Number of targets simultaneously
substring1Type SubstringType.GENERAL_STRING : Character string
: Recognition pattern of target 1 SubstringType.DATE : Date
substring2Type SubstringType.GENERAL_STRING : Character string
: Recognition pattern of target 2 SubstringType.DATE : Date
substring3Type SubstringType.GENERAL_STRING : Character string
: Recognition pattern of target 3 SubstringType.DATE : Date
Substring4Type SubstringType.GENERAL_STRING : Character string
: Recognition pattern of target 4 SubstringType.DATE : Date

Ocr.ocrStringFormat : Character string reading format settings


Property Setting value (Default: Bold)
Any character string (up to 1024 characters)
(Default “¥¥D[-.:/()#*¥¥¥¥+A-Z0-9]{3,30}”)

The format is specified with a regular expression.


Character string [A-Z]
Number [0-9]
lowercase [a-z]
Example: Setting the format to BT-A700 (alphabet character,alphabet
format character,-,alphabet character,number,number)
: Format setting [A-Z][A-Z]-[A-Z][0-9][0-9]
or
[A-Z]{3}-[A-Z][0-9]{2}
When setting multiple formats, connect them with a "|" character.
Example: Setting the format to BT-A700 and ABC123
[A-Z]{3}-[A-Z][0-9]{2}|[A-Z]{3}[0-9]{3}

Select "Settings" > "Scanner" > "OCR setting" > "String format settings"
and use "Show format strings" to check the current setting.

Ocr.ocrStringOutput : Character string output format settings


Property Setting value (Default: Bold)
removeMarks true : Enable
: Remove starting word false : Disable
removeSpaces true : Enable
: Remove spaces false : Disable
Any character string (up to 10 characters / 50 patterns) (Default: “”)
trimmingWordLists Specify the character to trim out. (When specifying multiple characters,
: Exclude mark symbols separate them with commas.)
Example: “/,#,LOT,No”

35 / 50
Ocr.ocrDateInput : Date reading format settings
Property Setting value (Default: Bold)
dateFrom “2000/01/01” – “2099/12/31” (10-digit character string)
: Date from (Default: “2017/01/01”)
dateTo “2000/01/01” – “2099/12/31” (10-digit character string)
: Date to (Default: “2029/12/31”)
separator.slash true : Enable
: Date separator: slash (“/”) false : Disable
separator.period true : Enable
: Date separator: period (“.”) false : Disable
separator.hyphen true : Enable
: Date separator: hyphen (“-”) false : Disable
separator.no_separator true : Enable
: Date separator: none false : Disable
separator.nen_getsu true : Enable
: Date separator: "年月" false : Disable
YearMonthDateInputOrder.YEAR_MONTH_DATE
: Year Month Date
yearMonthDateOrder YearMonthDateInputOrder.DATE_MONTH_YEAR
: Order : Date Month Year
YearMonthDateInputOrder.MONTH_DATE_YEAR
: Month Date Year
year.format YearFormat.YYYY_OR_YY : 4-digits or 2-digits
: Allow 2-digit Year YearFormat.YYYY : 4-digits
one_digit_month_date OneDigitMonthDate.DISABLE : Disable
: Allow 1-digit Month/Date OneDigitMonthDate.ENABLE : Enable
MonthInEnglish.DISABLE
: Disable
month.monthInEnglish MonthInEnglish.CAPITAL_ONLY
: Month in English : Capital only
MonthInEnglish.CAPITAL_AND_SMALL
: Capital and Small
DateFormat.DATE_ON
: Date On
date.format DateFormat.DATE_OFF
: Date Notation : Date Off
DateFormat.DATE_ON_OFF
: Date On and Off
date.jochuge.enable true : Enable
: Allow "上中下" false : Disable
date.jochuge.jo_date
1-31 (Default: 10)
: Day converted from "上"
date.jochuge.chu_date
1-31 (Default: 20)
: Day converted from "中"
date.jochuge.ge_date
1-31 (Default: 31)
: Day converted from "下"
YearJPN_Calendar.DISABLE
: Not use
year.treatYYasJPNCalendar
YearJPN_Calendar.ENABLE_JPN_CALENDER_1
: Japanese Notation1

36 / 50
YearJPN_Calendar.ENABLE_JPN_CALENDER_2
: Japanese Notation1・2
Year.jpnCalendar1.rangeFrom
: (Minimum) year to be recognized as Japanese 1-99 (Default 29)
calendar 1
Year.jpnCalendar1.rangeTo
: (Maximum) year to be recognized as Japanese 1-99 (Default 30)
calendar 1
Year.jpnCalendar1.startYear
1989-2039 (Default 1989)
: First year of Japanese calendar 1
Year.jpnCalendar2.rangeFrom
: (Minimum) year to be recognized as Japanese 1-99 (Default 1)
calendar 2
Year.jpnCalendar2.rangeTo
: (Maximum) year to be recognized as Japanese 1-99 (Default 5)
calendar 2
Year.jpnCalendar2.startYear
1989-2039 (Default 2019)
: First year of Japanese calendar 2

Ocr.ocrDateOutput : Date output format settings


Property Setting value (Default: Bold)
YearMonthDateOutputOrder.YYYYMMDD
: YYYYMMDD
YearMonthDateOutputOrder.YYYYMM
: YYYYMM
YearMonthDateOutputOrder.YYMMDD
: YYMMDD
YearMonthDateOutputOrder.YYMM
: YYMM
YearMonthDateOutputOrder.MMDDYYYY
yearMonthDateOutputOrder : MMDDYYYY
: Output order YearMonthDateOutputOrder.MMYYYY
: MMYYYY
YearMonthDateOutputOrder.MMDDYY
: MMDDYY
YearMonthDateOutputOrder.MMYY
: MMYY
YearMonthDateOutputOrder.DDMMYYYY
: DDMMYYYY
YearMonthDateOutputOrder.DDMMYY
: DDMMYY
DateOutputSeparator.NONE : none
DateOutputSeparator.SLASH : slash
separator
DateOutputSeparator.PERIOD : period
: Separator code
DateOutputSeparator.HYPHEN : hyphen
DateOutputSeparator.SPACE : space

37 / 50
Ocr.ocrDetection : Character detection settings
Property Setting value (Default: Bold)
Specific character string
validCamera “1” : Short
: Valid camera “12” : Short-Mid
“1234” : Full
confidenceLevel.alertSuccessBoundary
0(Lowest)-4(Highest) (Default 3)
: Detection threshold (success/alert threshold)
confidenceLevel.alertFailureBoundary
0(Lowest)-4(Highest) (Default 0)
: Detection threshold (alert/failure threshold)
StringRotation.ZERO_DEGREES
: 0 Degrees
StringRotation.ONE_HUNDRED_EIGHTEEN_DEGREES
stringRotation : 180 Degrees
: 180 Degrees StringRotation.BOTH
: Both
(StringRotation.BOTH is supported by device firmware Ver. 02.00.01 or
later)
Specific number
backgroundIrregularLevel 0 : None
: Background variation level 1 : Light
2 : Dark
heightVariation true : Enable
: Uneven height false : Disable
charactersCrossingOverLines true : Enable
: Cross over the frame false : Disable
noMarginAtTopOrBottom true : Enable
: For no margin top and bottom false : Disable
verticallyContactingCharacters true : Enable
: Contacting chara. (Vertical) false : Disable
horizontallyContactingCharacters true : Enable
: Contacting chara. (Horizontal) false : Disable

Ocr.ocrMultiTarget : Multiple character string reading settings


Property Setting value (Default: Bold)
SubstringArrangement.AUTO
: Auto
substringArrangement SubstringArrangement.VERTICALLY_ALIGNED
: Alignment : Vertical
SubstringArrangement.HORIZONTALLY_ALIGNED
: Horizontal
separatorEnable true : Enable
: Separator output false : Disable
separator
0-255 (Specify with ASCII codes) (Default: 32 (Space))
: Separator code

38 / 50
DataFormat class: Data output format settings
Property Setting value (Default: Bold)
Trim.TrimMode.DISABLE : Disable
trim.trimMode
Trim.TrimMode.FORWARD : Forward
: Trim mode
Trim.TrimMode.BACKWARD : Backward
trim.startPosition
1 to 7089 (number of digits) (Default: 1)
: Trim start position
trim.length
1 to 7089 (number of digits) (Default: 7089)
: Trim length
hexConversion true : Enable
: Hex Conversion false : Disable
prefixAimId true : Enable
: Prefix AIM ID false : Disable
prefix
Character string (up to 1024 characters) (Default: "")
: Prefix
suffix
Character string (up to 1024 characters) (Default: "")
: Suffix
DataFormat.Encoding.ISO_8859_1 : ISO-8859-1
characterSetEncoding DataFormat.Encoding.SHIFT_JIS : Shift_JIS
: Character set encoding DataFormat.Encoding.GB18030 : GB18030
DataFormat.Encoding.UTF_8 : UTF-8

39 / 50
DataOutput class: Data output method settings
DataOutput.keyStrokeOutput: keystroke settings
Property Setting value (Default: Bold)
enabled true : Enable
: Keystroke output false : Disable
KeyStrokeOutput.Terminator.NONE : None
KeyStrokeOutput.Terminator.TAB_KEY : Tab key
terminator KeyStrokeOutput.Terminator.ENTER_KEY : Enter key
: Terminator KeyStrokeOutput.Terminator.CTRL_ENTER_KEY : Ctrl + Enter key
KeyStrokeOutput.Terminator.EDITOR_ACTION : Editor Action
(Editor Action is supported by device firmware Ver. 02.00.01 or later)
keyEventDelay
0 to 200 (milliseconds) (Default: 0)
: Key event delay
KeyStrokeOutput.DeliveryType.INPUT_CONNECTION
deliveryType : Send via InputConnection
: Delivery type KeyStrokeOutput.DeliveryType.KEY_EVENT
: Send as a key event
Any character string (Maximum 1024 Characters)

The format is the following expression.


targetCode: Target of conversion
Specify with ASCII codes (0 - 255)
outputDataType: Output after conversion type
0 (key code) or 1 (Character string)
metaState: Modification key
Sum of 0 (None), 1 (Shift), 2 (Alt), or 1048576 (Caps lock)
keyEventConversion outputKeyCode: Key code after conversion (when outputDataType is 0)
:Key Event Conversion Specify any key code.
(Supported by device firmware Ver. 02.00.01 or outputString: String after conversion character (when outputDataType is
later) 1)
Specify any character string.
“;” is required at the end of each setting.

Example: Convert [0x09] into “A”


“targetCode:09,outputDataType:0,metaState:1,outputKeyCode:29;”

Example: Convert [0x09] into “A” and [0x0d] to “enter” (string)


“targetCode:09,outputDataType:0,metaState:1,outputKeyCode:29;target
Code:0d,outputDataType:1,metaState:0,outputString:enter;“

40 / 50
DataOutput.intentOutput: Intent settings
Property Setting value (Default: Bold)
enabled true : Enable
: Intent false : Disable
action
Character string (up to 1024 characters) (Default: "")
: Action
category
Character string (up to 1024 characters) (Default: "")
: Category
component
Character string (up to 1024 characters) (Default: "")
: Component
className
Character string (up to 1024 characters) (Default: "")
: Class
keyCodeType
: Extra key name (read code type) Character string (Maximum 1024 Characters)
(Supported by device firmware Ver. 02.00.01 or (Default value: com.keyence.autoid.scanmanagersdk.code_type)
later)
keyRawData
: Extra key name (read byte data) Character string (Maximum 1024 Characters)
(Supported by device firmware Ver. 02.00.01 or (Default value: com.keyence.autoid.scanmanagersdk.raw_data)
later)
keyData
: Extra key name (read data) Character string (Maximum 1024 Characters)
(Supported by device firmware Ver. 02.00.01 or (Default value: com.keyence.autoid.scanmanagersdk.data)
later)
IntentOutput.DeliveryType.BROADCAST
intentOutput.deliveryType : Send broadcast
: Delivery type IntentOutput.DeliveryType.START_ACTIVITY
: Send as startActivity

UserFeedback class: User feedback settings


UserFeedback.success: Read success behavior
Property Setting value (Default: Bold)
sound FeedbackParams.SoundType.DISABLE : Disable
: Sound FeedbackParams.SoundType.BUZZER : Buzzer
soundTone
1 (Lowest) to 16 (Highest) (Default: 16)
: Sound tone
vibrator true : Enable
: Vibrator false : Disable
FeedbackParams.Led.DISABLE : Disable
FeedbackParams.Led.GREEN : Green
FeedbackParams.Led.RED : Red
led FeedbackParams.Led.YELLOW : Yellow
:LED FeedbackParams.Led.CYAN : Cyan
FeedbackParams.Led.MAGENTA : Magenta
FeedbackParams.Led.BLUE : Blue
FeedbackParams.Led.WHITE : White
onPeriod
0 to 5000 (milliseconds) (Default: 100)
: On period
offPeriod
0 to 5000 (milliseconds) (Default: 0)
: Off period
repeatCount
0 to 10 (times) (Default: 1)
: Repeat count

41 / 50
UserFeedback.error: Read error behavior
Property Setting value (Default: Bold)
sound FeedbackParams.SoundType.DISABLE : Disable
: Sound FeedbackParams.SoundType.BUZZER : Buzzer
soundTone
1 (Lowest) to 16 (Highest) (Default: 16)
: Sound tone
vibrator true : Enable
: Vibrator false : Disable
FeedbackParams.Led.DISABLE : Disable
FeedbackParams.Led.GREEN : Green
FeedbackParams.Led.RED : Red
led FeedbackParams.Led.YELLOW : Yellow
:LED FeedbackParams.Led.CYAN : Cyan
FeedbackParams.Led.MAGENTA : Magenta
FeedbackParams.Led.BLUE : Blue
FeedbackParams.Led.WHITE : White
onPeriod
0 to 5000 (milliseconds) (Default: 100)
: On period
offPeriod
0 to 5000 (milliseconds) (Default: 0)
: Off period
repeatCount
0 to 10 (times) (Default: 1)
: Repeat count

UserFeedback.octAlert: Character recognition alert occurrence behavior


Property Setting value (Default: Bold)
sound FeedbackParams.SoundType.DISABLE : Disable
: Sound FeedbackParams.SoundType.BUZZER : Buzzer
soundTone
1 (Lowest) to 16 (Highest) (Default: 10)
: Sound tone
vibrator true : Enable
: Vibrator false : Disable
FeedbackParams.Led.DISABLE : Disable
FeedbackParams.Led.GREEN : Green
FeedbackParams.Led.RED : Red
led FeedbackParams.Led.YELLOW : Yellow
:LED FeedbackParams.Led.CYAN : Cyan
FeedbackParams.Led.MAGENTA : Magenta
FeedbackParams.Led.BLUE : Blue
FeedbackParams.Led.WHITE : White
pattern.onPeriod
0 to 5000 (milliseconds) (Default: 100)
: On period
pattern.offPeriod
0 to 5000 (milliseconds) (Default: 100)
: Off period
pattern.repeatCount
0 to 10 (times) (Default: 2)
: Repeat count
resultMode ResultMode.MODE1 : Enable
: Data output ResultMode.MODE2 : Disable

42 / 50
3.1.5.3. setDefault()

[Function] Resets the setting value of each parameter to the default shown in 3.1.5.2 Property List. This
is used when creating a parameter class instance without acquiring the settings with
getConfig().

[Format] void setDefault()

[Argument] None

[Return value] None

43 / 50
3.2. Notification Control Library

Example of Using the Notification Control Library


This section describes how to use the buzzer and LED control library.

3.2.1.1. Starting and Finishing Notification Control


Use the Notification class. Use createNotification() to create and acquire an instance at the start of control and
call releaseNotification() at the end to release the resources.

Example
// Import the Notification class.
import com.keyence.autoid.sdk.userfeedback.Notification;

public class MainActivity extends AppCompatActivity {

// Define the Notification class variables.


private Notification mNotification;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Create a Notification class instance.
mNotification = Notification.createNotification(this);
}

@Override
protected void onDestroy() {
super.onDestroy();

// Discard the Notification class instance to release the resources.


mNotification.releaseNotification();
}
}

44 / 50
3.2.1.2. Controlling Buzzer
Use startBuzzer() to sound the buzzer. The buzzer is stopped when the set time passes or by using
stopBuzzer().

Example
private boolean startBuzzer(){
mNotification.startBuzzer(12, 200, 50, 2);

private boolean stopBuzzer(){


mNotification.stopBuzzer();

3.2.1.3. Controlling LED


Use startLed() to turn on the LED. The LED is turned off when the set time passes or by using stopLed().

Example
private boolean startLed(){
mNotification.startLed(Notification.Led.GREEN, 100, 50, 3);

private boolean stopLed(){


mNotification.stopLed();

45 / 50
Notification Class
These classes are used to control the buzzer and LED. Use createNotification to create and acquire a
notification control instance at the start and call releaseNotification at the end to release the resources.

3.2.2.1. createNotification()
[Function] Creates a user notification instance. Call this first when performing user notification control.
Call releaseNotification() when user notification control no longer becomes necessary, like
after the application is closed.

[Format] static Notification createNotification(android.content.Context context)

[Argument] context Application context

[Return value] When the notification instance fails, null is returned.

3.2.2.2. releaseNotification()
[Function] Release the resources of the user notification instance. Call this when user notification no
longer becomes necessary.

[Format] void releaseNotification()

[Argument] None

[Return value] None

3.2.2.3. startBuzzer()
[Function] Sounds the buzzer.

[Format] boolean startBuzzer(int frequency, int onPeriod, int offPeriod, int repeatCount)

[Argument] frequency Buzzer scale (1 to 16)


onPeriod Buzzer On time (ms) (1 to 5000)
offPeriod Buzzer Off time (ms) (1 to 5000)
repeatCount Buzzer On/Off repeat count (1 to 10)

[Return value] true Success


false Failure

46 / 50
3.2.2.4. stopBuzzer()
[Function] Stops the buzzer.

[Format] void stopBuzzer()

[Argument] None

[Return value] None

3.2.2.5. startLed()
[Function] Turns on the LED.

[Format] boolean startLed(Notification.Led color, int onPeriod, int offPeriod, int repeatCount)

[Argument] color LED color


Notification.Led.DISABLE: No color
Notification.Led.GREEN: Green
Notification.Led.RED: Red
Notification.Led.YELLOW: Yellow
Notification.Led.CYAN: Cyan
Notification.Led.MAGENTA: Magenta
Notification.Led.BLUE: Blue
Notification.Led.WHITE: White
onPeriod LED On time (ms) (1 to 5000)
offPeriod LED Off time (ms) (1 to 5000)
repeatCount LED On/Off repeat count (1 to 10)

[Return value] true Success


false Failure

3.2.2.6. stopLed()
[Function] Turns off the LED.

[Format] void stoplLed()

[Argument] None

[Return value] None

47 / 50
3.3. Device Information Library
Example of Using the Terminal Information Library
This item explains how to use the library related to the terminal information. This library function is supported by
device firmware Ver. 02.00.01 or later.

3.3.1.1. Starting/Ending Terminal Information Library

Use DeviceInfo class. Create/acquire the instance using createDeviceInfo() when starting acquisition and
release the resources by calling releaseDeviceInfo() on ending.

Usage example:
// Import DeviceInfo class.
import com.keyence.autoid.sdk.deviceinfo.DeviceInfo;

public class MainActivity extends AppCompatActivity {

// Define the DeviceInfo class variable.


private DeviceInfo mDeviceInfo;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Create the DeviceInfo class instance.
mDeviceInfo = DeviceInfo.createDeviceInfo(this);
}

@Override
protected void onDestroy() {
super.onDestroy();
// Discard the DeviceInfo class instance and release the resource.
mDeviceInfo.releaseDeviceInfo();
}
}

3.3.1.2. Acquire the OCR License Status

Acquire the settings using getLicenceInfo().

Usage example: When obtaining the current license status and performing judgment
private boolean testGetLicenceInfoExample(){
//Define the variable to store the license status.
LicenceStatus ocrLicenceInfo = new LicenceInfo(FUNCTION_CODE_OCR);

//Acquire the current license status.


SdkStatus status = mDeviceInfo.getLicenceInfo(ocrLicenceInfo);
if (status == SdkStatus.SUCCESS){
}

//Judge the license status.


if (ocrLicenceInfo.isEnabled == true){
//Processing when license enable
}
}

48 / 50
DeviceInfo Class
Acquire device information. Create/acquire the device status acquire instance using createDeviceInfo() when
starting acquisition and release the resources by calling releaseDeviceInfo() on ending.

3.3.2.1. createDeviceInfo()

[Function] Create the device information acquire instance. When acquiring device information, call out
first. When the device information acquisition becomes unnecessary such as ending
application, call out releaseDeviceInfo() to release the resources. Immediately after restarting,
it may take about 30 seconds until execution.

[Format] static DeviceInfo createDeviceInfo(android.content.Context context)

[Argument] context Application context

[Return value] null is returned when a failure occurs with a DeviceInfo instance.

3.3.2.2. releaseDeviceInfo ()

[Function] Release the resource of the device information acquire instance. Call when the device
information acquisition becomes unnecessary such as when ending an application.

[Format] void releaseDeviceInfo()

[Argument] context Application context

[Return value] None

3.3.2.3. getLicenceInfo()

[Function] Obtain the License status.

[Format] SdkStatus getLicenceInfo (DeviceInfoParameter class p)

[Argument] DeviceInfoParameter class


LicenseInfo class License status class

[Return value] SdkStatus.SUCCESS Processing succeeded


SdkStatus.FAIL Processing failed
SdkStatus.INVALID_PARAM Error: Parameter is invalid.
SdkStatus.ALREADY_EXIST Error: Already exists.
SdkStatus.NOT_PERMIT Error: Not allowed.
SdkStatus.NOT_SUPPORT Error: Not supported.

49 / 50
Specifications are subject to change without notice.

KEYENCE CORPORATION
1-3-14, Higashi-Nakajima, Higashi-Yodogawa-ku, Osaka, 533-8555, Japan PHONE: +81-6-6379-2211
AUSTRIA FRANCE ITALY POLAND TAIWAN
Phone: +43 (0)2236 378266 0 Phone: +33 1 56 37 78 00 Phone: +39-02-6688220 Phone: +48 71 368 61 60 Phone: +886-2-2721-8080
BELGIUM GERMANY KOREA ROMANIA THAILAND
Phone: +32 (0)15 281 222 Phone: +49-6102-3689-0 Phone: +82-31-789-4300 Phone: +40 (0)269 232 808 Phone: +66-2-369-2777
BRAZIL HONG KONG MALAYSIA SINGAPORE UK & IRELAND
Phone: +55-11-3045-4011 Phone: +852-3104-1010 Phone: +60-3-7883-2211 Phone: +65-6392-1011 Phone: +44 (0)1908-696-900
CANADA HUNGARY MEXICO SLOVAKIA USA
Phone: +1-905-366-7655 Phone: +36 1 802 7360 Phone: +52-55-8850-0100 Phone: +421 (0)2 5939 6461 Phone: +1-201-930-0100
CHINA INDIA NETHERLANDS SLOVENIA VIETNAM
Phone: +86-21-3357-1001 Phone: +91-44-4963-0900 Phone: +31 (0)40 206 6100 Phone: +386 (0)1 4701 666 Phone: +84-24-3772-5555
CZECH REPUBLIC INDONESIA PHILIPPINES SWITZERLAND
Phone: +420 220 184 700 Phone: +62-21-2966-0120 Phone: +63-(0)2-8981-5000 Phone: +41 (0)43 455 77 30
A4WW1-MAN-2090

Copyright○
C 2021 KEYENCE CORPORATION. All rights reserved. 136434GB 2091-5 847GB

You might also like