BT-A700 Series Application Development Guide: Handheld Mobile Computer
BT-A700 Series Application Development Guide: Handheld Mobile Computer
BT-A700 Series Application Development Guide: Handheld Mobile Computer
BT-A700 Series
Application Development
Guide
Version 2.00
Table of Contents
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.
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.
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.
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.
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.
7 / 50
Creating a Project
If you are launching Android Studio for the first time, the "Welcome to Android Studio" window appears.
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].
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.
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.
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".
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.
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.
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".
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”.
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"
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.
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.
Example
// Import the ScanManager class.
import com.keyence.autoid.sdk.scan.ScanManager;
@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();
Example
// Start reading.
mScanManager.startRead();
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;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
@Override
protected void onDestroy() {
super.onDestroy();
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.
[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.
[Argument] None
3.1.2.3. setConfig()
[Function] Configures the detailed settings of the read code type.
21 / 50
3.1.2.4. getConfig()
[Function] Acquires the detailed settings of the read code type.
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.
[Argument] None
3.1.2.6. unlockScanner()
[Function] Restores the reading function.
[Argument] None
3.1.2.7. startRead()
[Argument] None
22 / 50
3.1.2.8. stopRead()
[Function] Stops reading using the soft trigger.
[Argument] None
3.1.2.9. isReading()
[Function] Checks whether reading is in progress or not.
[Argument] None
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.
3.1.2.11. removeDataListener()
[Function] Deletes the registered callback event of the reading result data.
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)
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)
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.
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.
[Argument] None
25 / 50
3.1.4.2. getCodeType()
[Function] Acquires the code type of the read data.
[Argument] None
3.1.4.3. getData()
[Function] Returns the read data as a character string.
[Argument] None
3.1.4.4. getRawData()
[Function] Acquires the read data as byte data.
[Argument] None
26 / 50
Read Parameter Class List
This section describes the parameter classes that can be set or acquired with
ScanManager.setConfig()/getConfig().
27 / 50
3.1.5.2. Property List
ScanParams class: Read behavior settings
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
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
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)
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
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
Select "Settings" > "Scanner" > "OCR setting" > "String format settings"
and use "Show format strings" to check the current setting.
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
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
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)
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
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
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().
[Argument] None
43 / 50
3.2. Notification Control Library
Example
// Import the Notification class.
import com.keyence.autoid.sdk.userfeedback.Notification;
@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();
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);
Example
private boolean startLed(){
mNotification.startLed(Notification.Led.GREEN, 100, 50, 3);
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.
3.2.2.2. releaseNotification()
[Function] Release the resources of the user notification instance. Call this when user notification no
longer becomes necessary.
[Argument] None
3.2.2.3. startBuzzer()
[Function] Sounds the buzzer.
[Format] boolean startBuzzer(int frequency, int onPeriod, int offPeriod, int repeatCount)
46 / 50
3.2.2.4. stopBuzzer()
[Function] Stops the buzzer.
[Argument] None
3.2.2.5. startLed()
[Function] Turns on the LED.
[Format] boolean startLed(Notification.Led color, int onPeriod, int offPeriod, int repeatCount)
3.2.2.6. stopLed()
[Function] Turns off the LED.
[Argument] 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.
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;
@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();
}
}
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);
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.
[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.
3.3.2.3. getLicenceInfo()
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