Newland Android PDA API Handbook V1.0.6
Newland Android PDA API Handbook V1.0.6
Development Environment................................................................................................................................ 1
Scan Barcode................................................................................................................................................ 1
Appendix ........................................................................................................................................................... 30
Development Environment
All APIs are built based on standard Android broadcast mechanism, so there is no need for additional
SDKs. The terminal application development environment is the same as Android application
development environment.
Barcode Scanner
Scan Barcode
To activate the terminal to scan barcode, application should send the following broadcast to the system.
Broadcast: nlscan.action.SCANNER_TRIG
Extra scan timeout parameter: SCAN_TIMEOUT (value: int, 1-9; default value: 3; unit: second)
To set scan timeout, i.e. the maximum time a scan attempt can last.
To set scan type: Value = 1, read one barcode during a scan attempt
Value = 2, read two barcodes during a scan attempt (This feature is NOT available)
Example 1:
Intent intent = new Intent ("nlscan.action.SCANNER_TRIG");
mContext.sendBroadcast(intent);
1
Example 2:
Intent intent = new Intent ("nlscan.action.SCANNER_TRIG");
intent.putExtra("SCAN_TIMEOUT", 4);// SCAN_TIMEOUT value: int, 1-9; unit: second
intent.putExtra("SCAN_TYPE ", 2);// SCAN_TYPE: read two barcodes during a scan attempt
mContext.sendBroadcast(intent);
Note: When a scan and decode session is in progress, sending the broadcast above will stop the
ongoing session. When scanning barcode by pressing the Scan key, it is processed at the bottom layer,
thus application does not need to listen for Scan KeyPress event or send the broadcast.
1. Fill in EditText directly: Output scanned data at the current cursor position in EditText.
2. Simulate keystroke: Output scanned data to keyboard buffer to simulate keyboard input and get the
data at the current cursor position in TextBox.
3. Output via API: Application acquires scanned data by registering a broadcast receiver and listening for
specific broadcast intents.
Broadcast: nlscan.action.SCANNER_RESULT
To get barcode data.
Extra scan result 1 parameter: SCAN_BARCODE1
To get the data of barcode 1.
Type: String
Extra scan result 1 raw byte parameter: scan_result_one_bytes
To get the byte data of barcode 1.
Type: byte[]
Extra scan result 2 parameter: SCAN_BARCODE2
To get the data of barcode 2.
Type: String
Extra scan result 2 raw byte parameter: scan_result_two_bytes
To get the byte data of barcode 2.
Type: byte[]
Extra symbology ID number parameter: SCAN_BARCODE_TYPE
Type: int (-1 indicates failure to get symbology ID Number)
To get the ID number of the barcode scanned (Refer to the “Symbology ID Number” table in
2
Appendix to get the barcode type).
Extra scan state parameter: SCAN_STATE (value: fail or ok)
To get the status of scan operation: Value = fail, operation failed
Value = ok, operation succeeded
Type: String
Example:
Stop Scanning
Note: When scanning barcode by pressing the Scan key, it is processed at the bottom layer to stop the
scan session, thus application does not need to send the broadcast. Even if you scan barcode by
pressing the Scan key, application only need to acquire scanned data by registering a broadcast receiver
and listening for specific broadcast intents, without having to send the broadcast to activate and stop
scanning.
3
Use the broadcast nlscan.action.STOP_SCAN to stop an ongoing decode session.
Example:
Intent stopIntent = new Intent(“nlscan.action.STOP_SCAN”);
mContext.sendBroadcast(stopIntent);
4
= 1 Enable the Scan key on right side as scan trigger*
Value = 0 Disable the trigger on pistol grip as scan trigger
TRIGGER_MODE_BLACK INT = 1 Enable the trigger on pistol grip as scan trigger*
(Precondition: The terminal supports this feature)
Set reread delay (millisecond)
Value = 0 Reread same barcode with no delay*
NON_REPEAT_TIMEOUT LONG
> 0 Do not allow to reread same barcode before the
delay expires
Value = 0 Disable prefix
SCAN_PREFIX_ENABLE INT
= 1 Enable prefix*
Value = 0 Disable suffix
SCAN_SUFFIX_ENABLE INT
= 1 Enable suffix*
Set prefix
SCAN_PREFIX STRING Value = Hexadecimal value of prefix character; default: null*
e.g. 0x61 should be entered as 61.
Set suffix
SCAN_SUFFIX STRING Value = Hexadecimal value of suffix character; default: null*
e.g. 0x61 should be entered as 61.
Character encoding
Value = 1 UTF-8
= 2 GBK*
= 3 ISO-8859-1
SCAN_ENCODE INT = 4 AUTO
= 5 Other
Should enter the value of SCAN_OTHER_ENCODE at
the same time
= 6 windows-1251
Value = true Enable overwrite output
OUTPUT_RECOVERABLE BOOLEAN
= false Disable overwrite output*
EXTRA_OUTPUT_EDITOR_ Value = 0 Disable software key event output *
INT
ACTION_ENABLE = 1 Enable software key event output
Value = 0 IME_ACTION_UNSPECIFIED
= 1 IME_ACTION_NONE
= 2 IME_ACTION_GO
EXTRA_OUTPUT_EDITOR_ = 3 IME_ACTION_SEARCH
INT
ACTION = 4 IME_ACTION_SEND
= 5 IME_ACTION_NEXT
= 6 IME_ACTION_DONE *
= 7 IME_ACTION_PREVIOUS
BROADCAST_OUTPUT_AC Broadcast output settings
STRING
TION Action value
BROADCAST_OUTPUT_EX Broadcast output settings
STRING Barcode Result 1 parameter
TRA_KEY_RESULT_1
BROADCAST_OUTPUT_EX Broadcast output settings
STRING Barcode Result 2 parameter
TRA_KEY_RESULT_2
Broadcast output settings
BROADCAST_OUTPUT_EX STRING
Barcode type parameter
5
TRA__KEY_BARCODE_TY
PE
BROADCAST_OUTPUT_EX Broadcast output settings
TRA__KEY_BARCODE_TY STRING Barcode type name parameter
PE_NAME
Configuring Symbologies
Application can set barcode parameter, such as enable/disable a symbology, transmit check character,
set minimum/maximum length by sending to the system the broadcast ACTION_BARCODE_CFG which
contains the following three parameters.
Parameter Type Description
Value = Barcode type
CODE_ID STRING
e.g. ”CODE128”
Value = Barcode parameter
PROPERTY STRING
e.g. ”Enable”, “Minlen”, or “TrsmtChkChar”
Value = Value of the barcode parameter
VALUE STRING
e.g. To enable a symbology, set the value to “1”
6
The following table describes in details the programmable barcode parameters through the
above-mentioned broadcast. Note that programmable barcode parameters depend on the scan engine
integrated in the terminal.
Barcode Parameter Parameter Settings
CODE_ID: ”CODE128”
PROPERTY: ”Enable”
Enable/Disable Code
VALUE: ”0” or ”1” (default: 1)
128
”0”: Disable Code 128
”1”: Enable Code 128
CODE_ID: ”CODE128”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 1)
Code 128
CODE_ID: ”CODE128”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”127” (default: 48)
CODE_ID: ”CODE128”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”UCCEAN128”
Enable/Disable GS1-128 PROPERTY: ”Enable”
VALUE: ”0” or ”1” (default: 1)
CODE_ID: ”UCCEAN128”
GS1-128
Set minimum length PROPERTY: ”Minlen”
(UCC/EAN-128)
VALUE: ”1” – ”127” (default: 1)
CODE_ID: ”UCCEAN128”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” - ”127” (default: 48)
CODE_ID: ”AIM128”
PROPERTY: ”Enable”
Enable/Disable AIM 128 VALUE: ”0” or ”1” (default: 0)
”0”: Disable AIM 128
”1”: Enable AIM 128
AIM 128
CODE_ID: ”AIM128”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” - ”127” (default: 1)
CODE_ID: ”AIM128”
Set maximum length
PROPERTY: ”Maxlen”
7
VALUE: ”1” - ”127” (default: 48)
CODE_ID: ”AIM128”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”EAN8”
PROPERTY: ”Enable”
Enable/Disable EAN-8 VALUE: ”0” or ”1” (default: 1)
“0”: Disable EAN-8
“1”: Enable EAN-8
CODE_ID: ”EAN8”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 1)
character
”0”: Do not transmit EAN-8 check character
”1”: Transmit EAN-8 check character
CODE_ID: ”EAN8”
PROPERTY: ”Digit2”
2-digit add-on code VALUE: ”0” or ”1” (default: 0)
”0”: Disable 2-digit add-on code
”1”: Enable 2-digit add-on code
CODE_ID: ”EAN8”
PROPERTY: ”Digit5”
EAN-8
5-digit add-on code VALUE: ”0” or ”1” (default: 0)
”0”: Disable 5-digit add-on code
”1”: Enable 5-digit add-on code
CODE_ID: ”EAN8”
PROPERTY: ”AddonRequired”
Add-on code required VALUE: ”0” or ”1” (default: 0)
”0”: EAN-8 add-on code not required
”1”: EAN-8 add-on code required
CODE_ID: ”EAN8”
PROPERTY: ”MsgtoEan13”
Enable EAN-8 zero
VALUE: ”0” or ”1” (default: 0)
extend
”0”: Disable EAN-8 zero extend
”1”: Enable EAN-8 zero extend
CODE_ID: ”EAN8”
Convert EAN-8 to PROPERTY: ”TypetoEan13”
EAN-13 VALUE: ”0” or ”1” (default: 0)
”0”: Do not convert EAN-8 to EAN-13
8
”1”: Convert EAN-8 to EAN-13
CODE_ID: ”EAN13”
PROPERTY: ”Enable”
Enable/Disable EAN-13 VALUE: ”0” or ”1” (default: 1)
“0”: Disable EAN-13
“1”: Enable EAN-13
CODE_ID: ”EAN13”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 1)
character
”0”: Do not transmit EAN-13 check character
”1”: Transmit EAN-13 check character
CODE_ID: ”EAN13”
PROPERTY: ”Digit2”
EAN-13 2-digit add-on code VALUE: ”0” or ”1” (default: 0)
”0”: Disable 2-digit add-on code
”1”: Enable 2-digit add-on code
CODE_ID: ”EAN13”
PROPERTY: ”Digit5”
5-digit add-on code VALUE: ”0” or ”1” (default: 0)
”0”: Disable 5-digit add-on code
”1”: Enable 5-digit add-on code
CODE_ID: ”EAN13”
PROPERTY: ”AddonRequired”
Add-on code required VALUE: ”0” or ”1” (default: 0)
”0”: EAN-13 add-on code not required
”1”: EAN-13 add-on code required
CODE_ID: ”ISSN”
PROPERTY: ”Enable”
ISSN Enable/Disable ISSN VALUE: ”0” or ”1” (default: 0)
“0”: Disable ISSN
“1”: Enable ISSN
CODE_ID: ”ISBN”
PROPERTY: ”Enable”
Enable/Disable ISBN VALUE: ”0” or ”1” (default: 0)
“0”: Disable ISBN
ISBN “1”: Enable ISBN
CODE_ID: ”ISBN”
PROPERTY: ”Length”
Set ISBN format
VALUE: ”0” or ”1” (default: 1)
”0”: ISBN-13
9
”1”: ISBN-10
CODE_ID: ”UPCE”
PROPERTY: ”Enable”
Enable/Disable UPC-E VALUE: ”0” or ”1” (default: 1)
“0”: Disable UPC-E
“1”: Enable UPC-E
CODE_ID: ”UPCE”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 1)
character
”0”: Do not transmit UPC-E check character
”1”: Transmit UPC-E check character
CODE_ID: ”UPCE”
PROPERTY: ”Digit2”
2-digit add-on code VALUE: ”0” or ”1” (default: 0)
”0”: Disable 2-digit add-on code
”1”: Enable 2-digit add-on code
CODE_ID: ”UPCE”
PROPERTY: ”Digit5”
UPC-E 5-digit add-on code VALUE: ”0” or ”1” (default: 0)
”0”: Disable 5-digit add-on code
”1”: Enable 5-digit add-on code
CODE_ID: ”UPCE”
PROPERTY: ”AddonRequired”
Add-on code required VALUE: ”0” or ”1” (default: 0)
”0”: UPC-E add-on code not required
”1”: UPC-E add-on code required
CODE_ID: ”UPCE”
PROPERTY: ”TrsmtSysDigit”
Transmit system
VALUE: ”0” or ”1” (default: 1)
character
”0”: Do not transmit system character
”1”: Transmit system character
CODE_ID: ”UPCE”
PROPERTY: ”MsgToupca”
Enable UPC-E extend VALUE: ”0” or ”1” (default: 0)
”0”: Disable UPC-E extend
”1”: Enable UPC-E extend
CODE_ID: ”UPCA”
PROPERTY: ”Enable”
UPC-A Enable/Disable UPC-A
VALUE: ”0” or ”1” (default: 1)
“0”: Disable UPC-A
10
“1”: Enable UPC-A
CODE_ID: ”UPCA”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 1)
character
”0”: Do not transmit UPC-A check character
”1”: Transmit UPC-A check character
CODE_ID: ”UPCA”
PROPERTY: ”Digit2”
2-digit add-on code VALUE: ”0” or ”1” (default: 0)
”0”: Disable 2-digit add-on code
”1”: Enable 2-digit add-on code
CODE_ID: ”UPCA”
PROPERTY: ”Digit5”
5-digit add-on code VALUE: ”0” or ”1” (default: 0)
”0”: Disable 5-digit add-on code
”1”: Enable 5-digit add-on code
CODE_ID: ”UPCA”
PROPERTY: ”AddonRequired”
Add-on code required VALUE: ”0” or ”1” (default: 0)
”0”: UPC-A add-on code not required
”1”: UPC-A add-on code required
CODE_ID: ”UPCA”
PROPERTY: ”TrsmtSysDigit”
Transmit preamble
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit UPC-A preamble character
”1”: Transmit UPC-A preamble character
CODE_ID: ”UPCA”
PROPERTY: ”Coupon”
Enable UPC-A + Coupon VALUE: ”0” or ”1” (default: 0)
”0”: Enable UPC-A + Coupon
”1”: Disable UPC-A + Coupon
CODE_ID: ”UPCA”
PROPERTY: ”ReqCoupon”
Require coupon VALUE: ”0” or ”1” (default: 0)
”0”: Do not require coupon
”1”: Require coupon
CODE_ID: ”UPCA”
Coupon GS1 Databar PROPERTY: ”Gs1Coupon”
output VALUE: ”0” or ”1” (default: 0)
”0”: GS1 output off
11
”1”: GS1 output on
CODE_ID: ”ITF”
PROPERTY: ”Enable”
Enable/Disable
VALUE: ”0” or ”1” (default: 1)
Interleaved 2 of 5
”0”: Disable Interleaved 2 of 5
”1”: Enable Interleaved 2 of 5
CODE_ID: ”ITF”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 6)
CODE_ID: ”ITF”
Set maximum length PROPERTY: ”Maxlen”
Interleaved 2 of
VALUE: ”1” – ”127” (default: 80)
5
CODE_ID: ”ITF”
PROPERTY: ”Check”
Check character
VALUE: ”0” - ”1” (default: 0)
verification
”0”: Disable check character verification
”1”: Enable check character verification
CODE_ID: ”ITF”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”ITF6”
PROPERTY: ”Enable”
Enable/Disable ITF-6 VALUE: ”0” or ”1” (default: 0)
”0”: Disable ITF-6
”1”: Enable ITF-6
ITF-6
CODE_ID: ”ITF6”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”ITF14”
PROPERTY: ”Enable”
Enable/Disable ITF-14 VALUE: ”0” or ”1” (default: 0)
”0”: Disable ITF-14
ITF-14
”1”: Enable ITF-14
CODE_ID: ”ITF14”
Transmit check
PROPERTY: ”TrsmtChkChar”
character
VALUE: ”0” or ”1” (default: 0)
12
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”MATRIX25”
PROPERTY: ”Enable”
Enable/Disable Matrix 2
VALUE: ”0” or ”1” (default: 1)
of 5
”0”: Disable Matrix 2 of 5
”1”: Enable Matrix 2 of 5
CODE_ID: ”MATRIX25”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 4)
CODE_ID: ”MATRIX25”
Set maximum length PROPERTY: ”Maxlen”
Matrix 2 of 5 VALUE: ”1” – ”127” (default: 80)
CODE_ID: ”MATRIX25”
PROPERTY: ”Check”
Check character
VALUE: ”0” - ”1” (default: 0)
verification
”0”: Disable check character verification
”1”: Enable check character verification
CODE_ID: ”MATRIX25”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”IND25”
PROPERTY: ”Enable”
Enable/Disable Industrial
VALUE: ”0” or ”1” (default: 0)
25
”0”: Disable Industrial 25
”1”: Enable Industrial 25
CODE_ID: ”IND25”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 6)
Industrial 25 CODE_ID: ”IND25”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”127” (default: 48)
CODE_ID: ”IND25”
PROPERTY: ”Check”
Check character
VALUE: ”0” - ”1” (default: 0)
verification
”0”: Disable check character verification
”1”: Enable check character verification
Transmit check CODE_ID: ”IND25”
13
character PROPERTY: ”TrsmtChkChar”
VALUE: ”0” or ”1” (default: 0)
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”STD25”
PROPERTY: ”Enable”
Enable/Disable Standard
VALUE: ”0” or ”1” (default: 0)
25
”0”: Disable Standard 25
”1”: Enable Standard 25
CODE_ID: ”STD25”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 6)
CODE_ID: ”STD25”
Set maximum length PROPERTY: ”Maxlen”
Standard 25 VALUE: ”1” – ”127” (default: 48)
CODE_ID: ”STD25”
PROPERTY: ”Check”
Check character
VALUE: ”0” - ”1” (default: 0)
verification
”0”: Disable check character verification
”1”: Enable check character verification
CODE_ID: ”STD25”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”CODE39”
PROPERTY: ”Enable”
Enable/Disable Code 39 VALUE: ”0” or ”1” (default: 1)
”0”: Disable Code 39
”1”: Enable Code 39
CODE_ID: ”CODE39”
Set minimum length PROPERTY: ”Minlen”
Code 39 VALUE: ”1” – ”127” (default: 1)
CODE_ID: ”CODE39”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”127” (default: 48)
CODE_ID: ”CODE39”
Check character PROPERTY: ”Check”
verification VALUE: ”0” - ”1” (default: 0)
”0”: Disable check character verification
14
”1”: Enable check character verification
CODE_ID: ”CODE39”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”CODE39”
PROPERTY: ”TrsmtStasrtStop”
Transmit start/stop
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit start/stop character
”1”: Transmit start/stop character
CODE_ID: ”CODE39”
PROPERTY: ”FullAscii”
Code 39 Full ASCII VALUE: ”0” or ”1” (default: 0)
”0”: Disable Code 39 Full ASCII
”1”: Enable Code 39 Full ASCII
CODE_ID: ”CODABAR”
PROPERTY: ”Enable”
Enable/Disable Codabar VALUE: ”0” or ”1” (default: 1)
”0”: Disable Codabar
”1”: Enable Codabar
CODE_ID: ”CODABAR”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 2)
CODE_ID: ”CODABAR”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”127” (default: 60)
CODE_ID: ”CODABAR”
Codabar
PROPERTY: ”Check”
Check character
VALUE: ”0” - ”1” (default: 0)
verification
”0”: Disable check character verification
”1”: Enable check character verification
CODE_ID: ”CODABAR”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”CODABAR”
Transmit start/stop
PROPERTY: ”TrsmtStasrtStop”
character
VALUE: ”0” or ”1” (default: 0)
15
”0”: Do not transmit start/stop character
”1”: Transmit start/stop character
CODE_ID: ”CODABAR”
PROPERTY: ”StartStopMode”
Start/Stop character
VALUE: ”0” or ”1” (default: 0)
format
”0”: ABCD/ABCD
”1”: ABCD/TN*E
CODE_ID: ”CODE93”
PROPERTY: ”Enable”
Enable/Disable Code 93 VALUE: ”0” or ”1” (default: 0)
”0”: Disable Code 93
”1”: Enable Code 93
CODE_ID: ”CODE93”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 1)
CODE_ID: ”CODE93”
Set maximum length PROPERTY: ”Maxlen”
Code 93 VALUE: ”1” – ”127” (default: 48)
CODE_ID: ”CODE93”
PROPERTY: ”Check”
Check character
VALUE: ”0” - ”1” (default: 0)
verification
”0”: Disable check character verification
”1”: Enable check character verification
CODE_ID: ”CODE93”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”CODE11”
PROPERTY: ”Enable”
Enable/Disable Code 11 VALUE: ”0” or ”1” (default: 0)
”0”: Disable Code 11
”1”: Enable Code 11
CODE_ID: ”CODE11”
Code 11
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 4)
CODE_ID: ”CODE11”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”127” (default: 48)
Check character CODE_ID: ”CODE11”
16
verification PROPERTY: ”ChkMode”
VALUE: ”0” - ”5” (default: 1)
”0”: Disable
”1”: 1 check character, MOD11
”2”: 2 check characters, MOD11/MOD11
”3”: 2 check characters, MOD11/MOD9
”4”: 1 check character, MOD11;
2 check characters, MOD11/MOD11
”5”: 1 check character, MOD11;
2 check characters, MOD11/MOD9
CODE_ID: ”CODE11”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”PLSY”
PROPERTY: ”Enable”
Enable/Disable Codabar VALUE: ”0” or ”1” (default: 0)
”0”: Disable Plessey
”1”: Enable Plessey
CODE_ID: ”PLSY”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 1)
CODE_ID: ”PLSY”
Set maximum length PROPERTY: ”Maxlen”
Plessey VALUE: ”1” – ”127” (default: 127)
CODE_ID: ”PLSY”
PROPERTY: ”Check”
Check character
VALUE: ”0” - ”1” (default: 0)
verification
”0”: Disable check character verification
”1”: Enable check character verification
CODE_ID: ”PLSY”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”MSIPLSY”
Enable/Disable PROPERTY: ”Enable”
MSI-Plessey
MSI-Plessey VALUE: ”0” or ”1” (default: 0)
”0”: Disable MSI-Plessey
17
”1”: Enable MSI-Plessey
CODE_ID: ”MSIPLSY”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”127” (default: 4)
CODE_ID: ”MSIPLSY”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”127” (default: 48)
CODE_ID: ”MSIPLSY”
PROPERTY: ”ChkMode”
VALUE: ”0” - ”3” (default: 1)
Check character
”0”: Disable
verification
”1”: 1 check character, MOD10
”2”: 2 check characters, MOD10/MOD10
”3”: 2 check characters, MOD10/MOD11
CODE_ID: ”MSIPLSY”
PROPERTY: ”TrsmtChkChar”
Transmit check
VALUE: ”0” or ”1” (default: 0)
character
”0”: Do not transmit check character
”1”: Transmit check character
CODE_ID: ”PDF417”
PROPERTY: ”Enable”
Enable/Disable PDF417 VALUE: ”0” or ”1” (default: 1)
”0”: Disable PDF417
”1”: Enable PDF417
CODE_ID: ”PDF417”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”2710” (default: 1)
CODE_ID: ”PDF417”
Set maximum length PROPERTY: ”Maxlen”
PDF417 VALUE: ”1” – ”2710” (default: 2710)
CODE_ID: ”PDF417”
PROPERTY: ”CodeNum”
PDF417 twin code VALUE: ”1” or “2” (default: 1)
”1”: Read single PDF417 code
”2”: Read two PDF417 codes
CODE_ID: ”PDF417”
PROPERTY: ”NumFixed”
Fixed number of
VALUE: ”0” or “1” (default: 1)
barcodes on an image
”0”: Varied number of barcodes on an image
”1”: Fixed number of barcodes on an image
18
CODE_ID: ”PDF417”
PROPERTY: ”VideoMode”
VALUE: ”0” or “2” (default: 0)
PDF417 inverse
”0”: Decode regular PDF417 barcodes only
”1”: Decode inverse PDF417 barcodes only
”2”: Decode both
CODE_ID: ”QR”
PROPERTY: ”Enable”
Enable/Disable QR
VALUE: ”0” or ”1” (default: 1)
Code
”0”: Disable QR Code
”1”: Enable QR Code
CODE_ID: ”QR”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”7089” (default: 1)
CODE_ID: ”QR”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”7089” (default: 7089)
CODE_ID: ”QR”
PROPERTY: ”CodeNum”
QR Code QR twin code VALUE: ”1” or “2” (default: 1)
”1”: Read single QR code
”2”: Read two QR codes
CODE_ID: ”QR”
PROPERTY: ”NumFixed”
Fixed number of
VALUE: ”0” or “1” (default: 1)
barcodes on an image
”0”: Varied number of barcodes on an image
”1”: Fixed number of barcodes on an image
CODE_ID: ”QR”
PROPERTY: ”VideoMode”
VALUE: ”0” or “2” (default: 0)
QR Code inverse
”0”: Decode regular QR barcodes only
”1”: Decode inverse QR barcodes only
”2”: Decode both
CODE_ID: ”DM”
PROPERTY: ”Enable”
Enable/Disable Data
VALUE: ”0” or ”1” (default: 1)
Matrix
Data Matrix ”0”: Disable Data Matrix
”1”: Enable Data Matrix
CODE_ID: ”DM”
Set minimum length
PROPERTY: ”Minlen”
19
VALUE: ”1” – ”3116” (default: 1)
CODE_ID: ”DM”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”3116” (default: 3116)
CODE_ID: ”DM”
PROPERTY: ”RectAngle”
Rectangular barcode VALUE: ”0” or ”1” (default: 1)
”0”: Disable rectangular DM
”1”: Enable rectangular DM
CODE_ID: ”DM”
PROPERTY: ”CodeNum”
Data Matrix twin code VALUE: ”1” or “2” (default: 1)
”1”: Read single Data Matrix code
”2”: Read two Data Matrix codes
CODE_ID: ”DM”
PROPERTY: ”NumFixed”
Fixed number of
VALUE: ”0” or “1” (default: 1)
barcodes on an image
”0”: Varied number of barcodes on an image
”1”: Fixed number of barcodes on an image
CODE_ID: ”DM”
PROPERTY: ”VideoMode”
VALUE: ”0” or “2” (default: 0)
Data Matrix inverse
”0”: Decode regular Data Matrix barcodes only
”1”: Decode inverse Data Matrix barcodes only
”2”: Decode both
CODE_ID: ”CSC”
PROPERTY: ”Enable”
Enable/Disable CS Code VALUE: ”0” or ”1” (default: 0)
”0”: Disable CS Code
”1”: Enable CS Code
CODE_ID: ”CSC”
Chinese Set minimum length PROPERTY: ”Minlen”
Sensible (CS) VALUE: ”1” – ”7827” (default: 1)
Code CODE_ID: ”CSC”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”7827” (default: 7827)
CODE_ID: ”CSC”
PROPERTY: ”CodeNum”
CS twin code
VALUE: ”1” or “2” (default: 1)
”1”: Read single CS code
20
”2”: Read two CS codes
CODE_ID: ”CSC”
PROPERTY: ”NumFixed”
Fixed number of
VALUE: ”0” or “1” (default: 1)
barcodes on an image
”0”: Varied number of barcodes on an image
”1”: Fixed number of barcodes on an image
CODE_ID: ”CSC”
PROPERTY: ”VideoMode”
VALUE: ”0” or “2” (default: 0)
CS Code inverse
”0”: Decode regular CS barcodes only
”1”: Decode inverse CS barcodes only
”2”: Decode both
CODE_ID: ”AZTEC”
PROPERTY: ”Enable”
Enable/Disable Aztec VALUE: ”0” or ”1” (default: 0)
”0”: Disable Aztec
”1”: Enable Aztec
CODE_ID: ”AZTEC”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”3832” (default: 1)
CODE_ID: ”AZTEC”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”3832” (default: 3832)
CODE_ID: ”AZTEC”
PROPERTY: ”CodeNum”
Aztec Aztec twin code VALUE: ”1” or “2” (default: 1)
”1”: Read single Aztec code
”2”: Read two Aztec codes
CODE_ID: ”AZTEC”
PROPERTY: ”NumFixed”
Fixed number of
VALUE: ”0” or “1” (default: 1)
barcodes on an image
”0”: Varied number of barcodes on an image
”1”: Fixed number of barcodes on an image
CODE_ID: ”AZTEC”
PROPERTY: ”VideoMode”
VALUE: ”0” or “2” (default: 0)
Aztec inverse
”0”: Decode regular Aztec barcodes only
”1”: Decode inverse Aztec barcodes only
”2”: Decode both
MicroPDF417 Enable/Disable CODE_ID: ”MICROPDF”
21
MicroPDF417 PROPERTY: ”Enable”
VALUE: ”0” or ”1” (default: 0)
”0”: Disable MicroPDF417
”1”: Enable MicroPDF417
CODE_ID: ”MICROPDF”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”366” (default: 1)
CODE_ID: ”MICROPDF”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”366” (default: 366)
CODE_ID: ”MICROQR”
PROPERTY: ”Enable”
Enable/Disable Micro
VALUE: ”0” or ”1” (default: 0)
QR
”0”: Disable Micro QR
”1”: Enable Micro QR
Micro QR CODE_ID: ”MICROQR”
Set minimum length PROPERTY: ”Minlen”
VALUE: ”1” – ”35” (default: 1)
CODE_ID: ”MICROQR”
Set maximum length PROPERTY: ”Maxlen”
VALUE: ”1” – ”35” (default: 35)
Reserved Keys
The terminal provides reserved keys, for example:
22
}
return super. onKeyDown(keyCode,event);
}
Other APIs
To enable/disable the notification bar pull-down, application should send to the system the broadcast
nlscan.action.STATUSBAR_SWITCH_STATE with the value of Extra parameter ENABLE set to be
true/false.
To enable/disable the feature of switching to desktop by pressing the Home key, application should send
to the system the broadcast nlscan.action.HOMEKEY_SWITCH_STATE with the value of Extra
parameter ENABLE set to be true/false.
Example: Disable the feature of switching to desktop by pressing the Home key
Intent intent = new Intent("nlscan.action.HOMEKEY_SWITCH_STATE");
intent.putExtra("ENABLE", false);
context.sendBroadcast(intent);
23
Set the System Time
To set the system time, application should send to the system the broadcast nlscan.action.SET_TIME
with the value of Extra parameter TIME_MS set to be a string represented as the number of millisecond.
Example:
Public long getTimeMillis(){
Calendar c=Calendar.getInstance();
c.set(2016,0,1,0,0,0);
return c.getTimeInMillis();
}
Intent it = new Intent("nlscan.action.SET_TIME");
long mills = getTimeMillis();
it.putExtra("TIME_MS", String.valueOf(mills));
mContext.sendBroadcast(it);
Application can set NFC, Positioning, Soft Keyboard, and APN by sending to the system the broadcast
com.nlscan.action.backuprecovery which contains the following parameters.
Calling Example:
String json = "{\n" +
"\t\"quick_setting\": [{\n" +
"\t\t\"quick_setting\": [{\n" +
"\t\t\t\"NFC.Enable\": \"1\"\n" +
"\t\t}],\n" +
"\t\t\"set_data_diff_flag\": \"0\"\n" +
"\t}],\n" +
"\t\"version\": \"V0.00.001\"\n" +
"}";
String action = "com.nlscan.action.backuprecovery";
String pkg = "com.nlscan.nlsbackuprecovery";
Intent intent = new Intent(action);
intent.setPackage(pkg);
24
intent.putExtra("set", json);
sendBroadcast(intent);
Json Explanation
NFC:
{
"quick_setting": [
{
"quick_setting": [
{
"NFC.Enable": "1" //1:Enable 0:Disable
}
],
"set_data_diff_flag": "1"
}
],
"version": "V0.00.001"
}
Soft Keyboard:
{
"quick_setting": [
{
"quick_setting": [
{
"SHOWSOFTINPUT.Enable": "1" //1:Enable 0:Disable
}
],
"set_data_diff_flag": "1"
}
],
"version": "V0.00.001"
}
25
Positioning:
{
"device_setting": [
{
"start_intent": [
{
"Intent.list": [
{
"type": "broadcast",
"action": "nlscan.action.WRITE_SETTINGS_DB",
"group_split_char":";",
"params":
"es-db-secure;es-name-location_providers_allowed;es-value-+network,gps;es-type-string"
}
]
}
],
"set_data_diff_flag": "1"
}
]
"version": "V0.00.001"
}
APN:
{
"device_setting": [
{
"apn": [
{
"RESET_APN.Enable": "1",
"APN_LIST.list": [
{
"APN_PROXY": "", //proxy
"APN_TYPE": "", //type
"APN_SUBID": "1", //SIM card id, "0" or "1" for single SIM
26
card
"APN_MVNO_TYPE": "", //MVNO Type
"APN_MMSC": "", //MMSC
"APN_MVNO_VALUE": "", //MVNO Value
"APN_AUTHTYPE": "", // Auth type, optional value:
PAP,CHAP,PAP OR CHAP
"APN_SERVER": "", //Server
"APN_APN": "11111", //APN
"APN_USER": "", //User Name
"APN_PROTOCOL": "IPv4/IPv6", //Protocol, optional value:IPv4,IPv6,
IPv4/IPv6
"APN_NAME": "11111", //APN name
"APN_PASSWORD": "", //Password
"APN_PORT": "", //Port
"APN_OPERTYPE": "2", // Do not change this item
"APN_MMSPROXY": "", //MMS proxy
"APN_ROAMING_PROTOCOL": "IPv4/IPv6", // Roaming protocol,
optional value:IPv4,IPv6,IPv4/IPv6
"APN_MMSPORT": "", //MMS port
"APN_BEARER": "" //Bearer system
}
]
}
],
"set_data_diff_flag": "1"
}
],
"version": "V0.00.001"
}
27
Remarks for APN settings: Manually add APN on the terminal and verify that the function is normal. Then
compelete the json parameter according to the detailed parameter interface of the APN newly added.
The above json can be set individually or in combination at one time as follows:
{
"device_setting": [
{
"start_intent": [
{
"Intent.list": [
{
"type": "broadcast",
"action": "nlscan.action.WRITE_SETTINGS_DB",
"group_split_char":";",
"params":
"es-db-secure;es-name-location_providers_allowed;es-value-+network,gps;es-type-string"
}
]
}
],
"apn": [
{
"RESET_APN.Enable": "1",
"APN_LIST.list": [
{
"APN_PROXY": "",
"APN_TYPE": "",
"APN_SUBID": "1",
"APN_MVNO_TYPE": "",
"APN_MMSC": "",
"APN_MVNO_VALUE": "",
"APN_AUTHTYPE": "",
"APN_SERVER": "",
"APN_APN": "11111",
"APN_USER": "",
"APN_PROTOCOL": "IPv4/IPv6",
"APN_NAME": "11111",
"APN_PASSWORD": "",
28
"APN_PORT": "",
"APN_OPERTYPE": "2",
"APN_MMSPROXY": "",
"APN_ROAMING_PROTOCOL": "IPv4/IPv6",
"APN_MMSPORT": "",
"APN_BEARER": ""
}
]
}
],
"set_data_diff_flag": "1"
}
],
"quick_setting": [
{
"quick_setting": [
{
"NFC.Enable": "1",
"SHOWSOFTINPUT.Enable": "1"
}
],
"set_data_diff_flag": "1"
}
],
"version": "V0.00.001"
}
Application can enable or disable the recent apps by sending to the system the broadcast
nlscan.action.SWITCH_RECENTS
Example:
Intent intent = new Intent("nlscan.action.SWITCH_RECENTS");
intent.putExtra("ENABLE", false); //Disable the recent apps
context.sendBroadcast(intent);
29
Appendix
Symbology ID Number
ID Number Symbology
0 ZASETUP
1 SETUP128
2 CODE128
3 UCCEAN128
4 AIM128
5 GS1_128
6 ISBT128
7 EAN8
8 EAN13
9 UPCE
10 UPCA
11 ISBN
12 ISSN
13 CODE39
14 CODE93
15 93I
16 CODABAR
17 ITF
18 ITF6
19 ITF14
20 DPLEITCODE
21 DPIDENTCODE
22 CHNPOST25
23 STANDARD25
23 IATA25
24 MATRIX25
25 INDUSTRIAL25
26 COOP25
27 CODE11
28 MSIPLESSEY
29 PLESSEY
30 RSS14
31 RSSLIMITED
30
32 RSSEXPANDED
33 TELEPEN
34 CHANNELCODE
35 CODE32
36 CODEZ
37 CODABLOCKF
38 CODABLOCKA
39 CODE49
40 CODE16K
41 HIBC128
42 HIBC39
43 RSSFAMILY
44 TriopticCODE39
45 UPC_E1
256 PDF417
257 MICROPDF
258 QRCODE
259 MICROQR
260 AZTEC
261 DATAMATRIX
262 MAXICODE
263 CSCODE
264 GRIDMATRIX
265 EARMARK
266 VERICODE
267 CCA
268 CCB
269 CCC
270 COMPOSITE
271 HIBCAZT
272 HIBCDM
273 HIBCMICROPDF
274 HIBCQR
275 DOTCODE
512 POSTNET
513 ONECODE
514 RM4SCC
515 PLANET
516 KIX
31
517 APCUSTOM
518 APREDIRECT
519 APREPLYPAID
520 APROUTING
768 NUMOCRB
769 PASSPORT
770 TD1
2048 PRIVATE
2049 ZZCODE
65535 UNKNOWN
32
Advanced Settings
1:Enable
CENTERDECOD
Acuscan / Enable 0:Disable Generic
E
Default value : 0
1:Enable
Output AI in AppIdSeparato
/ Enable 0:Disable Generic
brackets r
Default value : 0
1:Enable
Multiple
/ MultiDecode Enable 0:Disable Generic
barcodes
Default value : 0
1:Enable
Other Noise reduction OTHER Denoise 0:Disable Generic
Default value : 0
CM48
2:High CM48-V
1:Medium CM48MR
Exposure level OTHER ExposureLevel 0:Low CM26
255:Illumination off CM60
Default value : 1 CM60L
NFT10-DE3
1:Normal CM60
Illum mode OTHER IllumMode 0:No light CM60L
Default value : 1 CM30
1:Enable
OCR enable OTHER OCRPVIenable 0:Disable Generic
Default value : 0
33
SCANNING MADE SIMPLE