0% found this document useful (0 votes)
218 views99 pages

SmartPosAndroidSDK English V1.2.3 190411

This document provides documentation on the SDK interface for Shenzhen ZCS Technology Co., Ltd. It describes the SDK contents, how to create a project using the SDK, and the various class methods available, including methods for system initialization, reading device information, Bluetooth management, and EMV features. Revision histories are provided listing updates made to different versions of the SDK by date and developer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
218 views99 pages

SmartPosAndroidSDK English V1.2.3 190411

This document provides documentation on the SDK interface for Shenzhen ZCS Technology Co., Ltd. It describes the SDK contents, how to create a project using the SDK, and the various class methods available, including methods for system initialization, reading device information, Bluetooth management, and EMV features. Revision histories are provided listing updates made to different versions of the SDK by date and developer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 99

SDK interface documentation

SDK Library Interface Design

Shenzhen ZCS Technology Co., Ltd

1
Version number Date Xiugaizhe Explain
V1.01 _ B 20180601 2018-05-21 Xiaonana SDK generation
2018-06-15 Xiaonana M1 authentication, read
card, add card
2018-06-19 Xiaonana The return and listening of
the card data query method
is joined by a onNoCard
method to determine
whether the IC card is still
in the card slot or the card
area.
2018-06-23 Xiaonana RF card reset method.
Offline pin input method
Password keyboard settings
hide their own input box.
And setting the customized
edittext
V1.1.0_B20180717 2018-07-17 yyzz Mpos sdk integration
V1.1.1_B20180725 2018-07-25 yyzz 1. Add transparent mode
2. Mpos firmware
upgrade, unlock
interface added
V1.1.2_R20180730 2018-07-30 yyzz Add fingerprint input
interface
V1.1.3_R20180731 2018-07-31 yyzz Set system time, silent
installation and
uninstallation
V1.1.4_R20180810 2018-08-10 yyzz Get card hoder, exp, seq for
Mpos
V1.1.5_R20180818 2018-08-18 yyzz Mpos get tlv
V1.1.6_R180907 2018-09-07 yyzz 1. Silent installation and
silent uninstallation with
return value
2. Interface adjustment
V1.1.7_R181017 2018-10-17 yyzz Improve print speed
V1.1.8_R181102 2018-11-02 yyzz Add Mpos interface
V1.1.9_R181116 2018-11-16 yyzz Add SLE4442 feature
V1.2.0_R181126 2018-11-26 yyzz Add fingerprint feature
V1.2.1_R181129 2018-11-29 yyzz Add SLE4428 feature

2
V1.2.2_R190318 2019-03-18 yyzz DUKPT
V1.2.3_R190411 2019-04-11 yyzz 1. API adjustment
2.Mpos Bluetooth bug fix

1 Brief introduction.............................................................................................................................................................7
1.1 Demo................................................................................................................................................................. 8
1.2 Term................................................................................................................................................................... 8

1.3 SDK content.......................................................................................................................................................8

1.4 System requirements.........................................................................................................................................8


2 How to create a project?..................................................................................................................................................8
2.1 Create or open Project with android studio.......................................................................................................8
2.2 Add configuration and permissions to android manifest.xml............................................................................9
2.3 Set the interface styles.xml configuration for pin input...................................................................................10
2.4 Use the EMV feature........................................................................................................................................10

3 Class method..................................................................................................................................................................11

3.1 DriverManger class..........................................................................................................................................11


3.2 System module................................................................................................................................................11
3.2.1 Initialize the SDK..............................................................................................................................................12
3.2.2 Initialize sdk according to the connection method..........................................................................................12
3.2.3 Shows the method for debugging the log........................................................................................................13
3.2.4 Read Base SDK version number (AP)................................................................................................................13
3.2.5 Read the SDK version number.........................................................................................................................14
3.2.6 Read the random number (AP generation)......................................................................................................14
3.2.7 Get the terminal serial number........................................................................................................................14

3
3.2.8 Get the firmware version number...................................................................................................................15
3.2.9 Get the customer serial number......................................................................................................................15
3.2.10 Get terminal model..........................................................................................................................................16
3.2.11 Power on the system.......................................................................................................................................17
3.2.12 System down...................................................................................................................................................17
3.2.13 Setting the system time...................................................................................................................................17
3.2.14 Silently installing the specified application......................................................................................................18
3.2.15 Silently uninstall the specified application.......................................................................................................18
3.2.16 Setting the External Serial Port........................................................................................................................19
3.2.17 Send transparent data.....................................................................................................................................19
3.2.18 Receiving transparent data..............................................................................................................................20
3.2.19 Device Unlock Request (for internal use only).................................................................................................20
3.2.20 Device Unlocking (for internal use only)..........................................................................................................21
3.2.21 Firmware update.............................................................................................................................................21
3.3 Bluetooth management class (for Mpos).........................................................................................................22
3.3.1 Initialize............................................................................................................................................................22
3.3.2 Set up Bluetooth connection monitoring.........................................................................................................22
3.3.3 Search for Bluetooth........................................................................................................................................23
3.3.4 Cancel search for Bluetooth.............................................................................................................................23
3.3.5 Connect to Bluetooth.......................................................................................................................................24
3.3.6 Disconnect Bluetooth......................................................................................................................................24
3.3.7 Get Bluetooth connection status.....................................................................................................................24
3.3.8 Set timeout......................................................................................................................................................25
3.4 BluetoothHandler(For Mpos)...........................................................................................................................25
3.4.1 Add Emv callback listener................................................................................................................................25
3.4.2 Search card......................................................................................................................................................26
3.4.3 Cancel card search...........................................................................................................................................26
3.4.4 Specify the amount to execute Emv................................................................................................................26
3.4.5 Get 55 domain data.........................................................................................................................................27
3.4.6 Get track two data...........................................................................................................................................27
3.4.7 Get the card number........................................................................................................................................28
3.4.8 Get the card holder..........................................................................................................................................28
3.4.9 Get expire date................................................................................................................................................28

4
3.4.10 Get IC sequence number.................................................................................................................................29
3.4.11 Get TLV............................................................................................................................................................29
3.4.12 Display main screen (for Mpos).......................................................................................................................30
3.4.13 Screen display amount (for Mpos)...................................................................................................................30
3.4.14 Update system time (for Mpos).......................................................................................................................30
3.4.15 The screen displays the QR code and amount.................................................................................................31
3.5 Led class...........................................................................................................................................................31
3.5.1 Led................................................................................................................................................................... 32

3.6 Beeper class.....................................................................................................................................................32

3.6.1 beeper..............................................................................................................................................................33
3.6.2 The beeper specifies the frequency to sound..................................................................................................33
3.7 Reading card module.......................................................................................................................................34
3.7.1 CardReaderManager class...............................................................................................................................34
3.7.2 ICCard class......................................................................................................................................................37
3.7.3 MagCard class..................................................................................................................................................40
3.7.4 RFCard class.....................................................................................................................................................43
3.7.5 SLE4442Card class............................................................................................................................................48
3.7.6 SLE4428Card class............................................................................................................................................52
3.8 Print module....................................................................................................................................................56
3.8.1 Get the printing state.......................................................................................................................................57
3.8.2 Set the printing speed level.............................................................................................................................57
3.8.3 Append character data....................................................................................................................................58
3.8.4 Append QRcode...............................................................................................................................................59
3.8.5 Append barsCsode...........................................................................................................................................59
3.8.6 Append picture................................................................................................................................................60
3.8.7 Start printing....................................................................................................................................................61
3.9 Pin module.......................................................................................................................................................61
3.9.1 Get the random number..................................................................................................................................61
3.9.2 Set the encryption algorithm type...................................................................................................................62
3.9.3 Update master key...........................................................................................................................................62
3.9.4 Encrypted update master key..........................................................................................................................63
3.9.5 Update the work key........................................................................................................................................64
3.9.6 Update the encryption key in the work key.....................................................................................................64

5
3.9.7 Track data encryption......................................................................................................................................65
3.9.8 Computing mac................................................................................................................................................66
3.9.9 Download DUKPT in plain text.........................................................................................................................67
3.9.10 Calculate mac using DUKPT key.......................................................................................................................67
3.9.11 Encrypt data using the DUKPT key...................................................................................................................68
3.9.12 Set the prompt information that pin entered..................................................................................................69
3.9.13 Enter online PIN...............................................................................................................................................69
3.9.14 Hardware serial number key encryption..........................................................................................................70
3.9.15 Enter offline PIN...............................................................................................................................................71
3.9.16 Set password whether the input box is hidden................................................................................................72
3.9.17 Set edittext to use the password keyboard (after the password entry box is hidden).....................................72
3.10 Fingerprint module..........................................................................................................................................73
3.8.1 Initialize............................................................................................................................................................73
3.8.1 Close................................................................................................................................................................73
3.8.1 Capture............................................................................................................................................................74
3.8.1 Capture feature................................................................................................................................................74
3.8.1 Capture ISO feature.........................................................................................................................................75
3.8.1 Enrollment.......................................................................................................................................................75
3.8.1 Authenticate....................................................................................................................................................76
3.8.1 Authenticate....................................................................................................................................................76
3.8.1 Remove fingerprint..........................................................................................................................................77
3.8.1 Remove all.......................................................................................................................................................77
3.8.1 Get enrolled fingerprint count.........................................................................................................................77
3.8.1 Get the list of enrolled fingerprint id...............................................................................................................78
3.8.2 Generate a Bitmap and store it to the specified path......................................................................................78
3.8.3 Add listener......................................................................................................................................................79
3.8.4 Remove listener...............................................................................................................................................79
3.11 External card slot module (for exclusive external card slot)............................................................................80
3.11.1 ExternalCardManager 类.................................................................................................................................80
3.11.2 IC card..............................................................................................................................................................81
3.12 Serial port module (not available)....................................................................................................................84
3.13 String tools class..............................................................................................................................................84
3.13.1 Converts a 16 th string into an array of byte....................................................................................................84

6
3.13.2 Convert an array of byte into a 16 th string.....................................................................................................84
3.13.3 A string that converts an ASCII string into a 16 th decimal string....................................................................85
3.13.4 Convert a 16 th binary string to an ASCII string...............................................................................................85
3.13.5 Convert GBK bytes into strings........................................................................................................................85
3.13.6 Turn string into GBK bytes...............................................................................................................................86
3.13.7 Convert int into four bytes in large terminal mode byte []..............................................................................86
3.13.8 Convert int into two bytes in large terminal mode byte []...............................................................................86
3.13.9 Convert int into four bytes in small terminal mode byte []..............................................................................87
3.13.10 Convert four bytes of byte [] into int in large terminal mode...................................................................87
3.13.11 Converts four bytes of byte [] into int in small terminal mode.................................................................87
3.13.12 Get subarrays...........................................................................................................................................88
3.13.13 Combine two numbers into an array........................................................................................................88
3.13.14 To merge part of the data of two arrays into an array.............................................................................88
3.13.15 Converts an array of 16-step byte into a 16-step string...........................................................................89
3.14 Callback interface.............................................................................................................................................89
3.14.1 OnSearchCardListener.....................................................................................................................................89
3.14.2 OnPinPadInputListener....................................................................................................................................90
3.14.3 BluetoothListener(for Mpos)...........................................................................................................................90
3.14.4 OnBluetoothEmvListener(For Mpos)...............................................................................................................91
3.14.5 UpdateListener................................................................................................................................................91
3.14.6 FingerprintListener..........................................................................................................................................92
3.15 Returns code information................................................................................................................................93

7
1 Brief introduction

This document helps developers to develop third-party applications on the z90 equipment of the smart pos machine.Our
company provides the jar package for the API interface.
The developer based on the API interface, convenient and efficient development of third-party applications to meet
developers personalized needs.

1.1 Demo

The demo file demonstrates how to use the jar packet to call the various interfaces of the api to meet the needs of
the application.

1.2 Term

ResultData Clasee is data returns the value class, in which the field defines all return values in the document, and all
field descriptions are shown in the appendix.

1.3 SDK content

SDK includes .so files and .jar files

1.4 System requirements

Hardware: PC
System: windows
Development environment: eclipse
Version of the z90 android operating system: version 5.1.1 is on

8
2 How to create a project?

In order to add the jar package to the developer project, please follow the following steps:

1.5 Create or open Project with android studio

(1)Copy libSmartPosjni.so under the jnilibs/armabi folder

(2) copy martsPosAndroidSDK.jar under the libs/ folder

9
1.6 Add configuration and permissions to android manifest.xml

To use pin input, you need to configure it in android manifest.xml.


<activity
android:name="com.zcs.sdk.pin.pinpad.PinPadPasswordActivity"
android:theme="@style/Theme.WindowActivity">

Increase permissions
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.FLASHLIGHT"/>

1.7 Set the interface styles.xml configuration for pin input

<style name="Theme.WindowActivity" parent="android:style/Theme.Dialog">


<! --dialog box without title-->
<item name="android:windowIsTranslucent">true</item>
<! --//background of this dialog box-->
<item name="android:windowBackground">@android:color/transparent</item>
<! --dialog box transparent-->
<item name="android:windowContentOverlay">@null</item>
<! --dialog box is covered-->
<item name="android:windowIsFloating">true</item>
<! --frame dialog box whether floating-->
<item name="android:backgroundDimEnabled">true</item>
<! --//whether the background of the dialog box is allowed to darken-->
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</
item>
</style>

1.8 Use the EMV feature

To use the EMV feature, the libEmvCoreJni.so file are placed under jnilibs/armebi

10
3 Class method

1.1 DriverManger class

The DriverManager class is responsible for managing the general class of all the tools classes of the pos.
There are multiple access tools single class methods and system initialization methods.

Get the DriverManagers object


DriverManager manager = DriverManager.getInstance();

(A) the following:

Basic flowchart for operation of this module:

Start

Get the global object of the device operation.

Call the method to get the tool class.

11
1.2 System module

Mainly is the configuration system foundation information as well as obtains some basic data use class.
Get the objects for debugging the class:

Sys baseSysDevice = manager.getBaseSysDevice()

1.1.1 Initialize the SDK

Method name public int sdkInit();

Describe Initialize SDK


Input parameters

Output parameters
Return SDK_OK Success
Other See this subcompact definition (error
code)
Data structure
Note System initialization (AP and sp authentication), other functions can only be
used if authentication is successful.

1.1.2 Initialize sdk according to the connection method

12
Method name public int sdkInit( ConnectTypeEnum type);

Describe Initialize SDK

Input parameters type Connection Type enum

Output parameters
Return SDK_OK Success
Other See this subcompact definition (error
code)
Data structure
Note Bluetooth connection initialization method for our Mpos products

1.1.3 Shows the method for debugging the log.

Method name public void showLog(Boolean isShow);

Describe When debugging, setting whether to display debugging information.

Input parameters IsShow Setting whether to display debugging

information, not calling default does

not display

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.4 Read Base SDK version number (AP)

Method name public int getBaseSdkVer (string [] version)

Describe Read base SDK version number (AP)

Input parameters

13
Output parameters version This parameter is the value on the
first bit of the obtained version
information.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.5 Read the SDK version number

Method name public String getSdkVersion()

Describe Read the SDK version number

Input parameters

Output parameters String Version ASCII string

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.6 Read the random number (AP generation)

Method name public byte[] getRandom (byte length)

Describe Generating random numbers

Input parameters length Get the length of the random number

Output parameters

Return bute[] This parameter is a random number of

14
byte array types.

Data structure

Note

Example

1.1.7 Get the terminal serial number

Method name public int getPid (string [] PID)

Describe Get the terminal sequence number

Input parameters

Output parameters PID This parameter is the value on the

first bit of the obtained terminal

sequence PID array.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.8 Get the firmware version number

Method name public int getFirmwarVer(String [] version)

Describe Get firmware version number

Input parameters

Output parameters version This parameter is the value on the first

bit of the firmware version number

version array obtained.

15
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.9 Get the customer serial number

Method name public int getCustomerSn (String[] seriaNo)

Describe Get customer serial number

Input parameters

Output parameters seriaNo This parameter is the value on the


first bit of the obtained firmware
version number seriano array.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note To determine success by reference to the return parameters in

com.zcs.sdk.sdkresult, if successful, the value at the first place in the

area parameter seria no.

Example

1.1.10 Get terminal model

Method name public int getDevName (String [] devname)

Describe

Input parameters

Output parameters devName This parameter is the value on the first

16
bit of the obtained firmware version

number seriano array.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.11 Power on the system

Method name public int sysPowerOn()

Describe The electrical function of the system.

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note Call before system initialization.

Example

1.1.12 System down

Method name public int sysPowerOff()

Describe Power function of the system.

Input parameters

Output parameters

Return SDK_OK Success

17
Other See this subcompact definition (error

code)

Data structure

Note Called before the application is closed.

Example

1.1.1 Setting the system time

Method name public void setSystemClock(Context context, String datetime)

Describe

Input parameters context

datetime Format: yyyyMMddHHmmss

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note This interface can obtain root rights to modify system time.

Example

1.1.2 Silently installing the specified application

Method name public int installApp(Context context, String appFilePath);

Describe

Input parameters context

appFilePath The absolute path value of the APK,

such as /data/media/0/xxx.apk

Output parameters

Return SDK_ INSTALL_SUCCESS Success

18
Other See this subcompact definition (error

code)

Note

Example

1.1.3 Silently uninstall the specified application

Method name public int uninstallApp(Context context, String packageName)

Describe

Input parameters context

packageName Need to uninstall the package name

of the APK, for example

com.szzcs.smartpos

Output parameters

Return SDK_ INSTALL_SUCCESS Success

Other See this subcompact definition (error

code)

Note

Example

3.2.16 Setting the External Serial Port

Method name public int setExternalPort(byte isOpen, int uiBaut, byte[] PubKeyStatus)

Describe

Input parameters isOpen Mode: 1 = start; 0 = stop

uiBaut When mode is started, the baud rate is

only 00:115200 01: 9600 02:14400

03: 19200 04:28800 05: 38400 06:

57600

19
PubKeyStatus

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

3.2.17 Send transparent data

Method name public int externalPortSend(int dataLen, byte[] data)

Describe Send data to the external serial port

Input parameters dataLen Send data length

data Send data

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

3.2.18 Receiving transparent data

Method name public int externalPortRcv(int[] dataLen, byte[] data)

Describe Get data from the external serial port. When there is no data, the length

returned is 0.

Input parameters dataLen Receive data length

20
data Receive data

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

3.2.19 Device Unlock Request (for internal use only)

Method name public int requestUnlock(byte[] encData)

Describe Get 256 bytes of public key encrypted data

Input parameters encData Get 256 bytes of public key

encrypted data

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

3.2.20 Device Unlocking (for internal use only)

Method name public int unlock(int len, byte[] encData)

Describe Encrypted data for unlocking

Input parameters len Encrypted data length (bytes)

21
encData Encrypted data

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

3.2.21 Firmware update

Method name public void updateFirmware(File file, UpdateListener listener)

Describe Firmware update

Input parameters file Firmware file

Output parameters listener See details UpdateListener

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.3 Bluetooth management class (for Mpos)

The BluetoothManager class is responsible for Mpos Bluetooth scanning, connecting, disconnecting, and
obtaining connection status.

1.1.1 Initialize

Method name public BluetoothManager init()

22
Describe Bluetooth initialization, you need to call setContext() and

setBluetoothListener() before this

Input parameters

Output parameters

Return BluetoothManager

Data structure

Note

Example

1.1.2 Set up Bluetooth connection monitoring

Method name public BluetoothManager setBluetoothListener(BluetoothListener

listener)

Describe Set up Bluetooth connection monitoring

Input parameters listener See detail BluetoothListener(For

Mpos)

Output parameters

Return

Data structure

Note

Example

1.1.3 Search for Bluetooth

Method name public void discovery()

Describe Search for Bluetooth

Input parameters

Output parameters

23
Return

Data structure

Note

Example

1.1.4 Cancel search for Bluetooth

Method name public void stopDiscovery ()

Describe Cancel search for Bluetooth

Input parameters

Output parameters

Return

Data structure

Note

Example

1.1.5 Connect to Bluetooth

Method name public synchronized boolean connect(BluetoothDevice device)

Describe Connect to Bluetooth

Input parameters BluetoothDevice Remote Bluetooth device

Output parameters

Return

Data structure

Note

Example

1.1.6 Disconnect Bluetooth

Method name public synchronized void close()

24
Describe Disconnect Bluetooth

Input parameters

Output parameters

Return

Data structure

Note

Example

1.1.7 Get Bluetooth connection status

Method name public boolean isConnected()

Describe Get Bluetooth connection status

Input parameters

Output parameters

Return

Data structure

Note

Example

1.1.8 Set timeout

Method name public void setTimeout(int timeout)

Describe Set the timeout period. Note that the timeout is greater than the

timeout for checking the card and executing the EMV.

Input parameters

Output parameters

Return

Data structure

Note

25
Example

1.4 BluetoothHandler(For Mpos)

The BluetoothHandlered class is responsible for obtaining the relevant valid data after Mpos executes Emv.

Get the BluetoothHandler object


BluetoothHandler bluetoothHandler= manager.getBluetoothHandler();

1.1.9 Add Emv callback listener

Method name public void addEmvListener(OnBluetoothEmvListener listener)

Describe

Input parameters listener See detail

OnBluetoothEmvListener(For Mpos)

Output parameters

Return

Data structure

Note

Example

1.1.10 Search card

Method name public int searchCard(CardReaderTypeEnum cardType, int timeout)

Describe Search card

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

26
Data structure

Note

Example

1.1.11 Cancel card search

Method name public int cancelSearchCard()

Describe Cancel card search

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

1.1.12 Specify the amount to execute Emv

Method name public int emv(CardReaderTypeEnum cardType, int amount, String date,

int timeout)

Describe Specify the amount to execute Emv

Input parameters cardType Card type enum

amount Amount

date Time string, format

yyyyMMddHHmmss

timeout Timeout, unit s

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

27
Data structure

Note

Example

1.1.13 Get 55 domain data

Method name public String get55Field()

Describe Get 55 domain data

Input parameters

Output parameters

Return String 55 domain data

Data structure

Note

Example

1.1.14 Get track two data

Method name public String getTrack ()

Describe Get track two data

Input parameters

Output parameters

Return String track two data

Data structure

Note

Example

1.1.15 Get the card number

Method name public String getCardNo ()

Describe Get the card number

28
Input parameters

Output parameters

Return String card number

Data structure

Note

Example

1.1.16 Get the card holder

Method name public String getCardHolder ()

Describe Get the card holder

Input parameters

Output parameters

Return String Card holder(ASCII)

Data structure

Note Need to be called after getting 55 domain successfully

Example

1.1.17 Get expire date

Method name public String getExpDate ()

Describe Get expire date

Input parameters

Output parameters

Return String Expiration date

Data structure

Note Need to be called after getting 55 domain successfully

Example

29
1.1.18Get IC sequence number

Method name public String getIcSeq ()

Describe Get IC sequence number

Input parameters

Output parameters

Return String Seq

Data structure

Note Need to be called after getting 55 domain successfully

Example

1.1.19Get TLV

Method name public String getTagValue (String tag)

Describe Get value based on tag

Input parameters Tag Hex format tag string

Output parameters

Return String Successfully returned the

corresponding value, failed to return

null

Data structure

Note

Example

1.1.20Display main screen (for Mpos)

Method name public int LCDMainScreen ()

Describe Mpos display main screen

Input parameters

Output parameters

30
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.21Screen display amount (for Mpos)

Method name public int LCDAmount(int amount)

Describe Mpos device screen display amount

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.22Update system time (for Mpos)

Method name public int updateClock(String time)

Describe Mpos device update system time

Input parameters time Time string,yyyyMMddHHmmss

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

31
Example

1.1.23The screen displays the QR code and amount

Method name public int LCDQRCodeShow(int amount, String content)

Describe The screen displays the QR code and amount

Input parameters amount Amount, unit cent

content QR Code content

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.5 Led class

The led class is responsible for managing the lights on and off of the led lights of the poos.

Get led objects


Led ledDriver = manager.getLedDriver();

Basic flowchart for operation of this module:

Start

Get the object of the led class.

32
Call the set method to operate
the pos Led light switch

1.1.1 Led

Method name public void setLed(LightModeEnum light, boolean isOn)

Describe Open Led light

Input parameters Light Enumeration types: Rhododendron

red, green, yellow, and blue led

headlight

IsOn True: open;False: off

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure LightModeEnum


Red //light
Green //light
Yellow //yellow light
BLUE //Lantern
All //all lights
Note

Example

1.6 Beeper class

The beeper class is responsible for the management of the beeper.


Get the object of the beeper class:

33
Beeper beep = manager.getBeeper();

Basic flowchart for operation of this module:

Start

Object of the beeper class.

Call the beep method to drive the


beeper ring

3.2.1 beeper

Method name public void beep(int timeout)

Describe The drive buzzer keeps ringing for a long time, and the default
buzzer is 3000.
Input parameters beepTime Timeout length, unit milliseconds

Output parameters
Return SDK_OK Success
SDK_ERROR Fail
Data structure
Note

34
3.2.2 The beeper specifies the frequency to sound.

Method name public void beep(int frequence, int beepTime)

Describe The beeper sounds at the specified frequency and duration.

Input parameters frequence Frequency setting, may be a value of


500-8000, the minimum frequency is
500, the maximum frequency is 8000,
other values invalid.
beepTime The length of time, unit milliseconds,
and when it's 0, it means the
immediate stop.
Output parameters
Return SDK_OK Success
SDK_ERROR Fail
Data structure
Note

1.7 Reading card module

These include several categories: the CardReaderManager, the ICCard, the RFCard and the MagCard.

3.2.3 CardReaderManager class

The function of the CardReaderManager class is mainly to deal with the reading card of three kinds of cards and to
obtain the object of three kinds of cards.
Get the object of the CardReaderManager class:

CardReaderManager cardReaderManager= manager.getCardReadManager();

35
1.1.1.1 SearchCard method

Method name public void searchCard(final CardReaderTypeEnum searchCardType,

final int timeout,final OnSearchCardListener listener):

Describe Open the corresponding card reader and check whether the

corresponding card slot has a card.

Input parameters searchCardType CardReaderTypeEnum type

Query card type


timeout Timeout time (: ms).Does not timeout

when 0

listener Listener objects

Output parameters Check the listener Not the card information is

Information on the returned,the card type is returned

query card.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure CardReaderTypeEnum


/* *
* only the function of the psimi 1 query
*/
PSIM1 ,
/* *
* only the functions of the psim2 query
*/
PSIM2 ,
/* *
* function of card query only
*/
MAG_CARD,
/* *
* only IC card query function
*/
IC_CARD,
/* *
* only non-access card queries
*/

36
RF_CARD,
/* *
* features of magnetic and IC card queries
*/
MAG_IC_CARD,
/* *
* functions with magnetic and non-access card queries
*/
MAG_RF_CARD,

/* *
* features of IC and non-access card queries
*/
IC_RF_CARD,
/* *
* features of magnetic and IC cards and non-access card queries
*/
Mag _ IC_ RF _ card
Note
Example

1.7.1.1 Cancel search card

Method name public void cancelSearchCard();

Describe Cancel search card

Input parameters
Output parameters
Return
Data structure
Note
Example

1.7.1.2 Close the card module

Method name public int closeCard();

37
Describe Close all card slots.

Input parameters
Output parameters
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

1.1.2 ICCard class

The ICCardclass is basically the operation of data interaction on IC card, and the information of IC card reader is
encapsulated and implemented in the cardReaderManager, In the callback information for processing IC card data,
such as interaction operations.

Get the object of the ICCardclass

ICCard icCard = cardReaderManager.getICCard();

1.1.1.2 Upper electric reset

Method name public int icCardReset(CardSlotNoEnum slotNoEnum, byte[]

receiveAtr,int[] receiveLength)

Describe IC card with electric reset.

Input parameters slotNoEnum Card slot enum

Output parameters receiveLength Reduction response length

receiveAtr Reset response data

Return SDK_OK Success

Other See this subcompact definition (error

code)

38
Data structure CardSlotNoEnum
SDK_ICC_USERCARD
SDK_ICC_SAM1
SDK_ICC_SAM2
Note
Example

1.1.1.3 Upper electric reset

Method name public int icCardReset(CardSlotNoEnum slotNoEnum)

Describe IC card with electric reset.

Input parameters slotNoEnum Card slot enum

Output parameters
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

1.1.1.4 IC card Power down

Method name public int icCardPowerDown(CardSlotNoEnum slotNoEnum)

Describe IC card charging method

Input parameters slotNoEnum Card slot enum

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

39
Note

Example

1.1.1.5 Specifies the voltage wave rate reset card.

Method name public int icCardResetExt(CardSlotNoEnum slotNoEnum, byte

carVol, int baud, byte[] receiveAtr,int[] receiveLength)

Describe Specifies the voltage wave rate reset card.

Input parameters slotNoEnum Card slot enum

carVol Card voltage, 0x00: 1.8V, 0x01: 3V,

0x02: 5V

baud Baud rate. 0x00: 9600, 0x01: 19200,

0x02: 38400, 0x03: 57600, 0x04:

115200

Output parameters receiveLength Reduction response length

receiveAtr Reset response data

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

1.1.1.6 Apdu data interaction

Method name public int icExchangeAPDU (CardSlotNoEnum slotNoEnum, byte []

send Data, byte [] receiveData,int[] reveiceLength )

Describe IC card on the electroreset card method.

Input parameters slotNoEnum Card slot enum

sendData Send data

40
Output parameters receiveDataLength Response length

receiveData Answer data length 300.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

1.1.1.7 Apdu data interaction

Method name public byte [] icExchangeAPDU(CardSlotNoEnum slotNoEnum, byte[]

send Data )

Describe IC card on the electroreset card method.

Input parameters slotNoEnum Card slot enum

send Data Send data

Output parameters
Return byte [] Receive data information, return data

is empty when may be information

error.

Data structure
Note
Example

1.1.3 MagCard class

The MagCard class is basically something to do with the data interaction of the MagCard.

Get the object of the MagCard class

MagCard magCard = cardReaderManager.getMAGCard();

41
1.1.1.1 Open the MagCard device.

This method is to open the card reader device.

Method name public int magCardOpen();

Describe Open the bar card device.

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note Call this method to open the bar device once and you cannot call this

function again.

This function can be called before the query card is called, and can not

be called after the query card (the method of opening the magnetic

card device has been called when the query card is called.

Example

1.1.1.2 Close the MagCard device

Method name public int magCardClose();

Describe Close the bar card equipment

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note After the card operation is completed, the release method should be

adjusted to close the card, which is repeated in this method section.

42
Example

1.1.1.3 Empty the card cache information.

Method name public int magClearData();

Describe Empty the card cache.

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note This method needs to clear the information of the magnetic card device

before the query, so as to avoid the card reading data error.

Example

1.1.1.4 Get the channel plaintext information and parses it.

Method name public CardInfoEntity getMagReadData()

Describe Obtain the information of the magnetic channel and decrypt the card

number and the effective date.

Input parameters

Output parameters CardInfoEntity An entity class object that represents

an error in return for air

measurement.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note The interface callback after the query card is practical

43
Example

1.1.1.5 Parsing track information data

Method name public int getMagCardParseInfo(byte[] track1,byte[] track2, byte[]

track3, byte[] validDate2, byte[] cardNo2)

Describe Obtain the information of the magnetic channel and decrypt the

card number and the effective date.

Input parameters track1 Data information for track 1

track2 Data information for track 2

track3 Data information for track 3

Output parameters validDate2 Valid date

cardNo2 Card number please

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.4 RFCard class

The rfcard class is basically something that interacts data on the rfcard.

Get the object of the rfcard class

RFCard icCard = cardReaderManager.getRFCard();

1.1.1.6 powerDown

Method name public int rfCardPowerDown ();

Describe The power down function of a RFcard

44
Input parameters
Output parameters
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure
Note This method is the power-down function of the RFcard module.

Example

1.1.1.7 Remove card

Method name public int rfCardMoveCard ();

Describe The function of removing cards .


Input parameters
Output parameters
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure
Note This method is to remove the card from the RFcard module.

Example

1.1.1.8 RF Card Reset(no param)

Method name public int rfReset()

Describe Reduction of RF cards without parameters


Input parameters
Output parameters

45
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure
Note
Example

1.1.1.9 RFCard Reset (with param)

Method name Public access (byte [] resetdata, int [] datalengt)

Describe Reduction of RFcard parameters


Input parameters
Output parameters resetData Returned non-access card reset

information.

datalenght Returned non-access card reset

information length.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

1.1.1.10 Apdu data interaction

Method name public int rfExchangeAPDU(byte[] send Data, byte[] receiveData, int[]

reveiceLength)

Describe Apdu data interaction


Input parameters sendData Appu interactive parameters

46
Output parameters receiveData Output parameter length 300.

reveiceLength Output parameter length

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note Adpu interaction is a RFcards way of communicating data.

Example

1.1.1.11 Apdu data interaction

Method name public byte [] rfExchangeAPDU (byte [] send Data);

Describe Apdu data interaction


Input parameters send Data Appu interactive parameters

Output parameters
Return byte [] Receive data information, return data

is empty when may be information

error.

Data structure
Note Adpu interaction is a RFcardss way of communicating data.

Example

1.1.1.12 M1 card certification

Method name public int m1VerifyKey(byte block,byte keyType, byte[] key)

Describe Authentication operation of M1 card


Input parameters Block The block number of the first sector:

0,1,2,3 the block number of the

second sector: 4,5,6,7 ... each sector

has four blocks.

47
KeyType Authentication types 0x00typea and

0x01 typeb

Key Authentication password (default byte

6 bytes)

Output parameters
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

1.1.1.13 M1 card reader

Method name public int m1ReadBlock(byte block,byte[] outdate)

Describe The card reading operation of M1 card


Input parameters Block The block number of the first sector:

0,1,2,3 the block number of the

second sector: 4,5,6,7 ... each sector

has four blocks.

Output parameters Outdate Read block information.

Return SDK_OK Success


Other See this subcompact definition (error

code)

Data structure
Note
Example

48
1.1.1.14 M1 card writing card

Method name public int m1WirteBlock(byte block,byte[] inputdate)

Describe Authentication operation of M1 card


Input parameters Block The block number of the first sector:

0,1,2,3 the block number of the

second sector: 4,5,6,7 ... each sector

has four blocks.

Inputdate Input data information

Output parameters
Return SDK_OK Success
Other See this subcompact definition (error

code)

Data structure
Note When writing a card, the default does not write the fourth block of

each sector, and the fourth block may store the authentication

password, and if writing is may cannot certified M1 card., the first

block of the first sector also cannot write

Example

1.1.5 SLE4442Card class

The SLE4442Card class is basically something to do with the data interaction of the SLE4442 Card.

Get the object of the SLE4442Card class

SLE4442Card sle4442Card = cardReaderManager.getSLE4442Card ();

1.1.1.15 Init

Method name public int init()

49
Describe Init SLE4442 card

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note Check the first 4 bytes of content for card recognition

Example

1.1.1.16 Verify key

Method name public int verifyKey(byte[] key)

Describe Verify key

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note The default password is 3 bytes FF

Example

1.1.1.17 Read card data

Method name public int readData(byte startAddr, byte readLen, byte[] outData)

Describe Read card data

Input parameters startAddr Start address

readLen Read data length

50
Output parameters outData Read data

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.1.18 Write card data

Method name public int writeData(byte startAddr, byte writeLen, byte[] inData)

Describe Write card data

Input parameters startAddr Start address

writeLen Write data length

inData Write data

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

SDK_SLE4442_WRITE_ERR: write

card error

Data structure

Note

Example

1.1.1.19 Read protected data

Method name public int readProtectedData(byte[] outData)

Describe Read 32 bytes of protected data

51
Input parameters

Output parameters outData Protected data

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note 32 bytes, 0x30 means protected, 0x31 is unprotected

Example

1.1.1.20 Write protected data

Method name public int writeProtectedData(byte startAddr, byte writeLen, byte[]

inData)

Describe Write protected data

Input parameters startAddr Start address

writeLen Write data length

inData Data

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

SDK_SLE4442_ADDR_DATA_DIFF_ERR:

The corresponding location data

is different

Data structure

Note

Example

52
1.1.1.21 Change key

Method name public int changeKey(byte[] key)

Describe Change key

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

SDK_SLE4442_CHANGE_KEY_ERR:

Error to change the key

Data structure

Note

Example

1.1.1.22 Read error count and key

Method name public int readErrCountAndKey(byte[] key)

Describe Read the count of erifying key and the key

Input parameters

Output parameters key The first byte is the number of

password verifications (0x07: 3 times

can be verified, 0x06: 2 times, 0x04: 1

time), the last three bytes of

password, can not be read before the

password is verified.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

53
Note

Example

1.1.6 SLE4428Card class

The SLE4428Card class is basically something to do with the data interaction of the SLE4428 Card.

Get the object of the SLE4428Card class

SLE4428Card sle4428Card = cardReaderManager.getSLE4428Card ();

1.1.1.23 Init

Method name public int init()

Describe Init SLE4428 card

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note Check the first 4 bytes of content for card recognition

Example

1.1.1.24 Verify key

Method name public int verifyKey(byte[] key)

Describe Verify key

Input parameters

Output parameters

54
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note The default password is 2 bytes FF

Example

1.1.1.25 Read card data

Method name public int readData(int startAddr, int readLen, byte[] outData)

Describe Read card data

Input parameters startAddr Start address

readLen Read data length

Output parameters outData Read data

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.1.26 Write card data

Method name public int writeData(int startAddr, int writeLen, byte[] inData)

Describe Write card data

Input parameters startAddr Start address

writeLen Write data length

inData Write data

Output parameters

55
Return SDK_OK Success

Other See this subcompact definition (error

code)

SDK_SLE4428_WRITE_ERR: write

card error

Data structure

Note

Example

1.1.1.27 Read protected data

Method name public int readProtectedData(int startAddr, int readLen, byte[] outData)

Describe protected data

Input parameters startAddr Start address

readLen Read data length

Output parameters outData Protected data

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note 0x30 means protected, 0x31 is unprotected

Example

1.1.1.28 Write protected data

Method name public int writeProtectedData(int startAddr, int writeLen, byte[] inData)

Describe Write protected data

Input parameters startAddr Start address

writeLen Write data length

56
inData Data

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

SDK_SLE4428_WRITE_PRO_ERR: write

error

Data structure

Note

Example

1.1.1.29 Change key

Method name public int changeKey(byte[] key)

Describe Change key

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

SDK_SLE4428_CHANGE_KEY_ERR:

Error to change the key

Data structure

Note

Example

1.1.1.30 Read error count and key

Method name public int readErrCountAndKey(byte[] key)

57
Describe Read the count of erifying key and the key

Input parameters

Output parameters key The first byte is the number of

password verifications, the last three

bytes of password, can not be read

before the password is verified.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note The number of times can be converted to a decimal integer using

parseErrorCount(byte count)

Example

3.8 Print module

Pinter class is primarily a class that handles printing functions.


Get the object of the Pinter class:

Pinter printer= manager.getPinter();

3.8.1 Get the printing state.

Method name public int getPrinterStatus();

Describe Get the state of the print state.

Input parameters

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

58
Note Call the printing state before setting the printing function again.

Example

3.8.2 Set the printing speed level.

Method name public int setPrintSpeed(PrnSpeedTypeEnum typeEnum);

Describe Set the printing speed level.

Input parameters typeEnum PrnSpeedTypeEnum objects

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure PrnSpeedTypeEnum nume class


LOW_SPEED //low speed
MEDIUM_SPEED //medium speed
HIGHT_SPEED //high speed
Note This method sets the speed of printing when it is set to print (before

printing starts, after obtaining the state).

Example

3.8.3 Append character data

Method name public void setPrintAppendString(String string, PrnStrFormat format)

Describe Dot matrix prints additional character data

Input parameters string String needs to print the data.

format Prnstrformat entity object (some basic

settings)

Output parameters
Return SDK_OK Success
Other See this subcompact definition

59
(error code)
Data structure PrnStrFormatclass
private int textSize = 24;//string size, px
private boolean underline = false;//underline
private float textScaleX = 1.0f;//The horizontal scaling
parameter value of the font 0-1 indicates the reduction of the
font 1 indicates the normal size of 1 indicates the enlargement.
private float letterSpacing = 0f; //column spacing not
available
private Alignment ali = Alignment.ALIGN_NORMAL;
//alignment
private PrnTextStyle style = PrnTextStyle.NORMAL; //font
style
private PrnTextFont font = PrnTextFont.DEFAULT; //font
custom
The corresponding style class 1.
public enum PrnTextStyle {
NORMAL, BOLD, ITALIC, BOLD_ITALIC, ;
}
The corresponding style class 2.
public enum PrnTextFont {
DEFAULT("DEFAULT", 1) /* conventional font */,
DEFAULT_BOLD("DEFAULT_BOLD", 2) /* bold */,
MONOSPACE("MONOSPACE", 3) /* equal width */,
SANS_SERIF("SANS_SERIF", 4)/* sans serif */,
SERIF("SERIF", 5)/* serif */,
CUSTOM("CUSTOM", 6) /* custom */
}

Note This method is to use the dot matrix plot printing string method of

data into the print cache.

Example

3.8.4 Append QRcode

Method name public void setPrintAppendQRCode(String content, int width, int

height, Alignment alignment)

Describe A two-dimensional code used in dot matrix printing.

Input parameters Content String needs to print two-dimensional

60
code data

width The width of the two-dimensional

code

Height The height of the two-dimensional

code

Alignment Two-dimensional code position (right

middle left)

Output parameters
Return SDK_OK Success

Other See this subcompact definition


(error code)
Data structure Type of aigment system
Note This method is to use the dot matrix map to print the two
dimensional code, the data into the print cache.

Example

3.8.5 Append barsCsode

Method name public void setPrintAppendBarCode(Context context, String contents,

int desiredWidth, int desiredHeight, boolean displayCode,

Alignment alignment, BarcodeFormat format)


Describe An append bar code to a dot matrix print.
Input parameters context Text information

contents String needs to print bar code data.

width Bar code width

height Bar code height

displayCode Whether to display the bar code below

the display bar code data.

alignment Position (right middle left)

format Bar code coding format has 39 code

61
code, ean-13 code and so on a variety

of.

Output parameters
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure
Note This method is to use the dot matrix map printing bar code, the data

into the print cache.

Example

3.8.6 Append picture

Method name Public void setPrintAppendBitmap(Bitmap bitmap, Alignment

alignment)

Describe An append picture printed by a dot matrix.

Input parameters bitmap Bitmap needs printed bitmap data

alignment Position (right middle left)

Output parameters
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note This method is to use the dot matrix map printing bitmap, the data

into the print cache.

Example

62
3.8.7 Start printing

Method name Public void setPrintStart ()

Describe Print dot matrix after appending to start printing.


Input parameters
Output parameters
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure
Note When the dot matrix append is completed, the call prints out all the

additional information.

Example

3.9 Pin module

The function of the PinPad class is mainly to deal Some features of enter the password keyboard

Get the object of the PinPad class:


PinPadManager pinPad= manager.getPinPadManager ();

3.9.1 Get the random number

Method name public int pinPadGetRandom(byte[] random);

Describe Password keyboard Get random number (true random)

Input parameters

Output parameters random Byte [] type returns 8 bytes of random

number of parameters.

Return SDK_OK Success

Other See this subcompact definition (error

63
code)

Data structure

Note

Example

3.9.2 Set the encryption algorithm type.

Method name Public int pinPadSetAlgorithmMode(AlgorithmModeEnum

algorithmMode);

Describe Set encryption algorithm type of the algorithm thought 3DES/des

Input parameters algorithmMode Algorithmmodem enumeration objects

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure Algorithmmodem class


Des (byte) 0x01),
Dukpt ( (byte) 0x02);

Note Set encryption algorithm type of the algorithm thought 3DES/des

Example

3.9.3 Update master key

Method name public int pinPadUpMastKey(int keyIndex, byte[] keyData, byte

keyLength)

Describe Password keyboard update key

Input parameters keyIndex Main density index (0x000x0f)

keyData Zhumi yuemiwen

keyLength Master key length

64
Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

3.9.4 Encrypted update master key

Method name public int pinPadUpMastKey(int keyIndex, byte[] keyData, byte

keyLength, byte decKeyIndex)

Describe Encrypted update key

Input parameters keyIndex Zhumi yuesuoyin

keyData Zhumi yuemiwen

keyLength Master key length

decKeyIndex Decrypting the primary encryption

index

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

3.9.5 Update the work key

Method name public int pinPadUpWorkKey(int keyIndex, byte[] pinKeyData, byte

65
pinKeyLength,byte[] macKeyData, byte macKeyLength,byte[] tdk,

byte tdkLength)

Describe Pin module updates wage key

Input parameters keyIndex Main density index (0x000x0f)

pinKeyData Pin key message

pinKeyLength Pin key message length

macKeyData Mac key message

macKeyLength Mac key message length

tdk TDK key message

tdkLength Length of TDK key cryptography

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

3.9.6 Update the encryption key in the work key.

Method name public int pinPadUpEncryptKey(int keyIndex,byte[] keyData, byte

keyDataLength,PinEncryptTypeEnum transType)

Describe Pin module updates encryption key in work

Input parameters keyIndex Main density index (0x000x0f)

keyData Key data

keyDataLength Key data length

transType PinEncryptTypeEnum Enumeration type

transport type

Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

66
code)

Data structure PinEncryptTypeEnum class

/* *
* plain text
*/
PlLAIN_TEXT((byte)0x00),
/* *
* encrypted text of the password
*/
CRYPTO_TEXT((byte)0x01);

Note

Example

3.9.7 Track data encryption

Method name public int pinPadEncryptTrackData(int keyIndex,

MagEncryptTypeEnum magType, byte[] trackData,


byte trackDataLength,String[] outData)
Describe Pin module track data encryption

Input parameters keyIndex Main density index (0x000x0f)

magType Magencryptypeea enumeration type

Channel encryption means no

encreypt encryption

trackData To be encrypted track data

trackDataLength Data length to be encrypted

Output parameters outData Returns the parameter.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure Magencryptypeea class


**
* silver standard algorithm

67
*/
Un _ encreypt (byte) 0x00);
Note
Example

3.9.8 Computing mac

Method name public int pinPadMac(int keyIndex, PinMacTypeEnum macType, byte[]

inputData,int inputDataLength,String[] outData)

Describe Pin module computing mac

Input parameters keyIndex Main density index (0x000x0f)

macType Pinmactypee enumeration type

Mac type 0x00: ECB (silver standard


algorithm)...

inputData Data to be calculated

inputDataLength Data length

Output parameters outData Returns the parameter.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure PinMacTypeEnum class


**
* silver standard algorithm
*/
ECB((byte)0x00),
/*
*
*/
ANSI_X_9_9((byte)0x01),
/*
*
*/
ANSI_X_9_19((byte)0x02),
/*
*
*/

68
XOR((byte)0x04);
Note
Example

3.9.9 Download DUKPT in plain text

Method name public int pinPadUpDukpt(int keyIndex, byte[] keyData, byte

keyLength, byte[] ksn)

Describe
Input parameters keyIndex Key index

keyData Key

keyLength Key length

ksn KSN

Output parameters
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

3.9.10Calculate mac using DUKPT key

Method name public int pinPadMacByDukpt(int keyIndex, PinMacTypeEnum

macType, byte[] inputData, int inputDataLength, byte[] outData,

byte[] ksn)

Describe
Input parameters keyIndex Key index

macType Mac type enum

inputData Input data

69
inputDataLength Input data length

Output parameters outData Out data

ksn KSN

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

3.9.11Encrypt data using the DUKPT key

Method name public int pinPadEncryptDataByDukpt(int keyIndex,

PinWorkKeyTypeEnum workType, byte[] inputData, int

inputDataLength, byte[] outData, byte[] ksn)

Describe
Input parameters keyIndex Key index

workType Work key type enum

inputData Input data

inputDataLength Input data length

Output parameters outData Out data

ksn KSN

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

70
3.9.12Set the prompt information that pin entered.

Method name public void setInputPinTitle(String payTitle)

Describe This is the information displayed on the input password interface.

Input parameters payTitle Prompt information (default display

when not set: please enter your

password (no password press

confirmation key):

Output parameters
Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

3.9.13Enter online PIN

Method name public void inputOnlinePin( Context context, byte minLength,byte


maxLength,int timeOut, boolean isBypass , String cardNo,byte
keyIndex, PinAlgorithmMode pinMode, OnStartCallBackListener
callback)
Describe Display PIN keyboard, enter online PIN, get Pinblock

Input parameters context Activity text box

minLength The minimum input PIN length.

maxLength Maximum input PIN length.

timeOut Enter PIN timeout (: ms)

isBypass Do you allow the transaction to

continue without entering the PIN

(press the confirmation key directly):

71
allow

cardNo Card number ASC code please

keyIndex Zhumi yuesuoyin

pinMode Pinalgoritmod enumeration type

Algorithm type

callback Callback objects

Output parameters Callback internal return Callback information

parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure PinAlgorithmMod Class


ANSI_X_9_8((byte)0x00),
ANSI_X_3_92((byte)0x01);
Note
Example

3.9.14Hardware serial number key encryption

Method name public int pinPadSM4Encrypt(byte mode,byte[] pucFactor,byte[]

outData)

Describe
Input parameters mode When ucMode is 0, encrypt the

hardware serial number. ucMode is 1,

encrypted directly on factor

pucFactor When the ucMode is 0, the puctor

must be a 6byte random encryption

factor (6 bits after the bank card

number)

ucMode is 1, and a puctor must be


16 bytes of data
Output parameters outData The cimacc8 byte ucMode is 1 when

72
the uccode is 0, and 16 bytes of data

are encrypted using sm4.

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure
Note
Example

3.9.15Enter offline PIN

Method name public void inputOfflinePin( Context context, byte minLength,byte


maxLength,int timeOut, boolean isBypass , OnPinPadInputListener
callback)
Describe Display PIN keyboard, enter offline PIN, get Pinblock

Input parameters context Activity text box

minLength The minimum input PIN length.

maxLength Maximum input PIN length.

timeOut Enter PIN timeout (: ms)

isBypass Do you allow the transaction to

continue without entering the PIN

(press the confirmation key directly):

allow

callback Callback objects

Output parameters Callback internal return Callback information

parameters

Return

Data structure
Note
Example

73
3.9.16Set password whether the input box is hidden.

Method name public void setKeyBoardViewMode(PinKeyboardViewModeEnum

keyModeEnum);

Describe Set the password, whether the keyboard is hidden.

Input parameters KeyModeEnum PinKeyboardViewModeEnum

Output parameters

Return

Data structure public enum PinKeyboardViewModeEnum {

/**
* the default needs to display its own input box.
*/
DEFAULT,
/**
* this parameter indicates a hidden input box that requires
a custom input box
*/
NO_INPUTVIEW;
}
Note When you need a custom password input box, this needs to be set.

Example

3.9.17Set edittext to use the password keyboard (after the password entry

box is hidden)

Method name public void setEditTextView(EditText vEditText);

Describe Set the password input box to hide the desired edit objects that

need to be passed in.

Input parameters VEditText An input box that requires a password

keyboard.

74
Output parameters

Return

Data structure

Note This must be set when 3.7.13 is set to NO_INPUTVIEW

Example

1.1 Fingerprint module

The fingerprint module is responsible for providing functions such as opening, closing, fingerprinting, verification, and
deletion of the fingerprint module.
Get the object of the FingerprintManager class:
FingerprintManager fingerprintManager= manager.get FingerprintManager ();

3.8.1 Initialize

Method name public boolean init()

Describe Initialize

Input parameters

Output parameters

Return boolean true Success,false fail

Data structure

Note

Example

3.8.1 Close

Method name public boolean close()

Describe Fingerprint is closed and resources are released

Input parameters

75
Output parameters

Return boolean true Success,false fail

Data structure

Note

Example

3.8.1 Capture

Method name public void capture(int timeout)

Describe Capture

Input parameters timeout Timeout, in seconds (range 0~50)

Output parameters

Return

Data structure

Note Get the image data in the onGetImageFeature() callback

Example

3.8.1 Capture feature

Method name public void captureAndGetFeature(int timeout)

Describe Capture current fingerprint image features

Input parameters timeout Timeout, in seconds (range 0~50)

Output parameters

Return

Data structure

Note Get the data in the onGetImageFeature () callback

Example

76
3.8.1 Capture ISO feature

Method name public void captureAndGetFeature(int timeout)

Describe Capture current fingerprint image features as ISO format

Input parameters timeout Timeout, in seconds (range 0~50)

Output parameters

Return

Data structure

Note Get the data in the onGetImageISOFeature () callback

Example

3.8.1 Enrollment

Method name public void enrollment(int fingerId, int count, int timeout)

Describe Collect fingerprint image features three times to complete user

fingerprint information registration

Input parameters fingerId Fingerprint id

count To complete a fingerprint template

registration, you need to press it

three times, in the order of 1-2-3.

timeout Timeout, in seconds (range 0~50)

Output parameters

Return

Data structure

Note Get the enrollment result in onEnrollmentProgress()

callback
Example

77
3.8.1 Authenticate

Method name public void authenticate(int timeout)

Describe Obtain the currently pressed finger fingerprint feature and the

fingerprint library template for 1:N search comparison

Input parameters timeout Timeout, in seconds (range 0~50)

Output parameters

Return

Data structure

Note The result in onAuthenticationSucceeded() and

onAuthenticationFailed()

Example

3.8.1 Authenticate

Method name public void authenticate(int fingerId, int timeout)

Describe Get the 1:1 comparison between the currently pressed finger

fingerprint feature and the specified template in the fingerprint

library.

Input parameters fingerId Fingerprint id

timeout Timeout, in seconds (range 0~50)

Output parameters

Return

Data structure

Note The result in onAuthenticationSucceeded() and

onAuthenticationFailed()

Example

78
3.8.1 Remove fingerprint

Method name public int remove(int fingerid)

Describe Remove enrolled fingerprint by id

Input parameters fingerId Fingerprint id

Output parameters

Return

Data structure

Note

Example

3.8.1 Remove all

Method name public int removeAll()

Describe Remove all enrolled fingerprint

Input parameters

Output parameters

Return

Data structure

Note

Example

3.8.1 Get enrolled fingerprint count

Method name public Result getEnrolledCount()

Describe Get the number of fingerprint library fingerprint registrations

Input parameters

79
Output parameters

Return Result Result.error: status code


Result.arg1: enrolled count
Data structure public class Result {
public final int error;
public final int arg1;
public final int arg2;
public final Object data;

}
Note

Example

3.8.1 Get the list of enrolled fingerprint id

Method name public Result getEnrolledFingerprints()

Describe Get the list of enrolled IDs in the device fingerprint library

Input parameters

Output parameters

Return Result Result.error: status


Result.data: the list of ids
Data structure public class Result {
public final int error;
public final int arg1;
public final int arg2;
public final Object data;

}
Note

Example

80
3.8.2 Generate a Bitmap and store it to the specified path

Method name public Bitmap generateBmp(byte[] buffer, String path)

Describe Generate a Bitmap and store it to the specified path

Input parameters buffer Bitmap

path Picture storage path

Output parameters

Return Bitmap Bitmap object in memory

Data structure

Note Fingerprint images can be saved in the onGetImageComplete callback

Example

3.8.3 Add listener

Method name public void addFignerprintListener(FingerprintListener listener)

Describe Add listener

Input parameters listener See detail 3.14.6

Output parameters

Return

Data structure

Note

Example

3.8.4 Remove listener

Method name public void removeFignerprintListener(FingerprintListener listener)

Describe Remove listener

Input parameters listener See detail 3.14.6

81
Output parameters

Return

Data structure

Note

Example

1.2 External card slot module (for exclusive external card slot)

1.1.7 ExternalCardManager 类

The function of the ExternalCardManager class is mainly to process the card search of the external card slot and obtain
the card object.
Get the object of the CardReaderManager class:
ExternalCardManager cardManager= manager.getExternalCardManager()

1.7.1.3 Search card

Method name public void searchCard(final byte slot, final int timeout, final

OnSearchCardListener listener)

Describe Specify card slot search card

Input parameters slot Slot no, 0~F


timeout Timeout (:ms) does not time out
when it is 0
listener listener
Output parameters
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure

82
Note
Example

1.7.1.4 Cancel search card

Method name public void cancelSearchCard()

Describe Cancel search card


Input parameters
Output parameters
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure
Note
Example

1.7.1.5 Close card

Method name public int closeCard(byte slot);

Describe Close the specified card slot

Input parameters Slot Slot no, 0~F


Output parameters
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure
Note
Example

83
1.1.8 IC card

The ICard class is basically some operations such as data interaction on the ic card.
Get the object of the ICCard class
ICCard icCard = externalCardManager.getICCard()

1.1.1.1 Reset

Method name public int icCardReset(byte slotNo, byte[] receiveAtr,int[]

receiveLength)

Describe Reset
Input parameters slotNo Slot no, 0~F
Output parameters receiveLength Reset response length
receiveAtr Reset response data
Return SDK_OK Success
Other See this subcompact definition
(error code)
Data structure
Note
Example

1.1.1.2 Reset

Method name public int icCardReset(byte slotNo)

Describe Reset
Input parameters slotNo Slot no, 0~F
Output parameters
Return SDK_OK Success
Other See this subcompact definition
(error code)

84
Data structure
Note
Example

1.1.1.3 Power down

Method name public int icCardPowerDown(byte slotNo)

Describe Power down

Input parameters SlotNo Slot no, 0~F


Output parameters

Return SDK_OK Success

Other See this subcompact definition (error

code)

Data structure

Note

Example

1.1.1.4 APDU data interaction

Method name public int icExchangeAPDU (byte slotNo, byte [] send Data, byte []

receiveData,int[] reveiceLength )

Describe APDU data interaction

Input parameters slotNo Slot no, 0~F


sendData Send data
Output parameters receiveDataLength Send data length
receiveData Response data length
Return SDK_OK Success

85
Other See this subcompact definition (error

code)

Data structure
Note
Example

1.1.1.5 APDU data interaction

Method name public byte [] icExchangeAPDU(byte slotNo, byte[] send Data )

Describe APDU data interaction

Input parameters slotNo Slot no, 0~F


send Data Send data
Output parameters
Return byte [] Repsonse data
Data structure
Note
Example

3.12 Serial port module (not available)

UART class serial module information


Get the object of the UART class:

Uarticle manganager.getuart ();

3.13 String tools class

The string tools class is mainly used for data transformation between the text and the string.

86
3.13.1Converts a 16 th string into an array of byte.

Method name public static byte[] convertHexToBytes(String src)

Describe example hex 3f to binary 00100101

Input parameters src An incoming 16-step string.

Output parameters byte[] Returned array information.

Data structure
Note

3.13.2Convert an array of byte into a 16 th string.

Method name public static String convertBytesToHex(byte[] src)

Describe

Input parameters src Enter an array of byte

Output parameters String A string that is converted into a 16-step

system, such as fffffa.

Data structure

Note

Example

3.13.3A string that converts an ASCII string into a 16 th decimal string.

Method name public static String convertStringToHex(String str)

Describe Mike: 1to31

Input parameters src Enter an array of byte

Output parameters String A string that is converted into a 16-step

system, such as fffffa.

Data structure

87
Note

3.13.4Convert a 16 th binary string to an ASCII string.

Method name public static String covertHexToASCII(String str)

Describe Like: 31 to1

Input parameters str Enter a 16-step string.

Output parameters String The string of ASCII

Data structure

Note

3.13.5Convert GBK bytes into strings.

Method name public static String fromGBK(byte[] strData)

Describe

Input parameters str

Output parameters String

Data structure

Note

3.13.6Turn string into GBK bytes

Method name public static byte[] getGBK(String strData)

Describe

Input parameters strData

Output parameters byte[] GBK words to reduce expenditure

Data structure

88
Note

3.13.7Convert int into four bytes in large terminal mode byte [].

Method name public static byte[] intToBytesBig(int value)

Describe

Input parameters value

Output parameters byte[]

Data structure

Note

3.13.8Convert int into two bytes in large terminal mode byte [].

Method name public static byte[] intToBytes2Byte(int value)

Describe

Input parameters value

Output parameters byte[]

Data structure

Note

3.13.9Convert int into four bytes in small terminal mode byte [].

Method name public static byte[] intToBytesLittle(int value)

Describe

Input parameters value

Output parameters byte[]

Data structure

Note

89
3.13.10 Convert four bytes of byte [] into int in large terminal mode.

Method name public static int bytesToIntBig(byte[] src, int offset)

Describe

Input parameters byte[]

offset The location where the four bytes begin.

Output parameters int

Data structure

Note

3.13.11 Converts four bytes of byte [] into int in small terminal mode.

Method name public static int bytesToIntLittle(byte[] src, int offset)

Describe

Input parameters byte[]

offset The location where the four bytes begin.

Output parameters int

Data structure

Note

3.13.12 Get subarrays

Method name public static byte[] subByte(byte[] array,int offset, int length)

Describe

Input parameters array The array object to get.

length Get the length

offset Get the starting position

Output parameters byte[] Get the array

Data structure

Note

90
3.13.13 Combine two numbers into an array.

Method name public static byte[] concat(byte[] array1, byte[] array2)

Describe

Input parameters Array1

array2

Output parameters byte[]

Data structure

Note

3.13.14 To merge part of the data of two arrays into an array.

Method name public static byte[] concat(byte[] array1, int beginIndex1, int

length1,byte[] array2, int beginIndex2, int length2)

Describe

Input parameters Array1 Array 1

beginIndex1 The starting position of the array 1.

length1 Length of array 1

array2 Array 2

beginIndex2 The starting position of array 2.

length2 Length of array 2

Output parameters byte[] The merged array to return.

Data structure

Note

3.13.15 Converts an array of 16-step byte into a 16-step string.

Method name public static String byteToString(byte[] byteParam)

Describe

Input parameters byteParam

91
Output parameters byte[]

Data structure

Note

3.14 Callback interface

3.14.1OnSearchCardListener

public interface OnSearchCardListener {


/*
* recovered card results
* *
* @ para code { @ link resource data }
* @ paramcard-info { @ linkcard.info }
*/
void onCardInfo(CardInfoEntity carInfo);
/ *
* data information on failed search cards
*/

void onError(int resultCode);


/*
* query slot information (mainly for non-access IC use for circular
queries)
* @ paramfloat
*/
void onNoCard(CardReaderTypeEnum cardType,boolean flag);

3.14.2OnPinPadInputListener

public interface OnPinPadInputListener {


/*
* returns the error code
*/
void onError(int resultCode);
/*

92
* password pinblock information
*/
void onSuccess(byte[] pinBlock);
}

3.14.3BluetoothListener(for Mpos)

public interface BluetoothListener {


/**
* Callback when searching for devices
* @param device
* @return
*/
public boolean isReader(BluetoothDevice device);

/**
* Callback when starting connection
* @param device
*/
public void startedConnect(BluetoothDevice device);

/**
* Callback when the connection is successful
* @param device
*/
public void connected(BluetoothDevice device);

/**
* Callback when canceling connection
*/
public void disConnect();

/**
* Callback when starting to search for devices
*/
public void startedDiscovery();

/**
* Callback when ending the search
*/
public void finishedDiscovery();
}

93
3.14.4OnBluetoothEmvListener(For Mpos)

public interface OnBluetoothEmvListener {


/**
* Enter the pin and press the ENTER button to call back
*/
public void onKeyEnter();

/**
* Callback when the cancel button is pressed
*/
public void onKeyCancel();

/**
* Callback when card is detected
* @param cardDetected card type
*/
public void onCardDetect(CardDetectedEnum cardDetected);

/**
* Callback when executing emv timeout
*/
public void onEmvTimeout();

/**
* Callback when entering password timeout
*/
public void onEnterPasswordTimeout();

/**
* Callback when Emv succeeds or fails
* @param emvStatus
*/
public void onEmvStatus(EmvStatusEnum emvStatus);
}

3.14.5UpdateListener

public interface UpdateListener {


/**
* Callback when the update is successful
*/

94
void onSuccess();

/**
* Update progress callback
*
* @param current Current transfer firmware byte
* @param max Total firmware length
*/
void onProcessChange(long current, long max);

/**
* Callback when the update fails
*
* @param errCode {@link SdkResult}
* @param msg
*/
void onError(int errCode, String msg);
}

3.14.6FingerprintListener

public interface FingerprintListener {


/**
* Fingerprint entry progress
*
* @param fingerId Fingerprint ID
* @param remaining Indicates that this finger entry is completed and
needs to be entered a few more times (currently, one finger needs to be
entered 3times to complete)
* @param reason Status
*/
public void onEnrollmentProgress(int fingerId, int remaining, int
reason);

/**
* Fingerprint auth failed
*
* @param reason
*/
public void onAuthenticationFailed(int reason);

/**
* Fingerprint auth succeeded
*

95
* @param fingerId Fingerprint Id
* @param result
*/
public void onAuthenticationSucceeded(int fingerId, Object obj);

/**
* Get fingerprint image
*/
public void onGetImageComplete(String result, byte[] imgBuff);

/**
* Get fingerprint feature
*
* @param result
* @param feature
*/
public void onGetImageFeature(int result, byte[] feature);

/**
* Get fingerprint ISO features
*
* @param result
* @param feature
*/
public void onGetImageISOFeature(int result, byte[] feature);
}

3.15 Returns code information

Returns code information

public static final int SDK_OK = 0; //Success


public static final int SDK_ERROR = -1001; //Fail
public static final int SDK_PARAMERR = -1002; //Param error
public static final int SDK_TIMEOUT = -1003; //Timeout
public static final int SDK_RECV_DATA_ERROR = -1004; //Receive data error

//ic card
public static final int SDK_ICC_BASE_ERR = -1200;
public static final int SDK_ICC_ERROR = (SDK_ICC_BASE_ERR -1); //Error
public static final int SDK_ICC_PARAM_ERROR = (SDK_ICC_BASE_ERR -2); //Param error
public static final int SDK_ICC_NO_CARD = SDK_ICC_BASE_ERR-3; //Slot no card

96
public static final int SDK_ICC_NO_RESP = SDK_ICC_BASE_ERR-4; //Timeout no response
public static final int SDK_ICC_COMM_ERR = SDK_ICC_BASE_ERR-5; // Card communication
error (parity error or LRC error)
public static final int SDK_ICC_RESP_ERR = SDK_ICC_BASE_ERR-6; // Card return
information error
public static final int SDK_ICC_NO_POWER_ON = SDK_ICC_BASE_ERR-7; // Card is not power on

//SLE4442
public static final int SDK_SLE4442_BASE_ERR = -1200;
public static final int SDK_SLE4442_ERROR = SDK_SLE4442_BASE_ERR - 1;//Error
public static final int SDK_SLE4442_PARAM_ERROR = SDK_SLE4442_BASE_ERR - 2;//Param error
public static final int SDK_SLE4442_NO_CARD = SDK_SLE4442_BASE_ERR - 3; // Slot no card
public static final int SDK_SLE4442_DETECT_ERR = SDK_SLE4442_BASE_ERR - 0xB0;//SLE4442
detect error
public static final int SDK_SLE4442_KEY_ERR = SDK_SLE4442_BASE_ERR - 0xB1;//Key error
public static final int SDK_SLE4442_KEY_NO_COUNT = SDK_SLE4442_BASE_ERR - 0xB2; // Key no
count, the card has been scrapped
public static final int SDK_SLE4442_WRITE_ERR = SDK_SLE4442_BASE_ERR - 0xA9;//Write error
public static final int SDK_SLE4442_ADDR_DATA_DIFF_ERR = SDK_SLE4442_BASE_ERR - 0xA9;// The
corresponding location data is different
public static final int SDK_SLE4442_CHANGE_KEY_ERR = SDK_SLE4442_BASE_ERR - 0xA9; //Change key
failed

//SLE4428
public static final int SDK_SLE4428_BASE_ERR = -1200;
public static final int SDK_SLE4428_ERROR = SDK_SLE4428_BASE_ERR - 1; //Error
public static final int SDK_SLE4428_PARAM_ERROR = SDK_SLE4428_BASE_ERR - 2; //Param error
public static final int SDK_SLE4428_NO_CARD = SDK_SLE4428_BASE_ERR - 3; // Slot no card
public static final int SDK_SLE4428_DETECT_ERR = SDK_SLE4428_BASE_ERR - 0xB3; // SLE4428
detect error
public static final int SDK_SLE4428_KEY_ERR = SDK_SLE4428_BASE_ERR - 0xB4; // Key error
public static final int SDK_SLE4428_KEY_NO_COUNT = SDK_SLE4428_BASE_ERR - 0xB5; // Key no
count, the card has been scrapped
public static final int SDK_SLE4428_WRITE_ERR = SDK_SLE4428_BASE_ERR - 0xA9; //Write error
public static final int SDK_SLE4428_WRITE_PRO_ERR = SDK_SLE4428_BASE_ERR - 0xAA; //Write error
public static final int SDK_SLE4428_CHANGE_KEY_ERR = SDK_SLE4428_BASE_ERR - 0xB6; ///Change key
failed

//rf card
public static final int SDK_RF_BASE_ERR = -1300;
public static final int SDK_RF_ERROR = (SDK_RF_BASE_ERR-1); //Error
public static final int SDK_RF_PARAM_ERROR = (SDK_RF_BASE_ERR-2); //Param error
public static final int SDK_RF_ERR_NOCARD = (SDK_RF_BASE_ERR-3); // No cards found
public static final int SDK_RF_ERR_CARD_CONFLICT = (SDK_RF_BASE_ERR-4); // Multi-card
conflict
public static final int SDK_RF_TIME_OUT = (SDK_RF_BASE_ERR-5); // TIME OUT ERROR

97
public static final int SDK_RF_PROTOCOL_ERROR = (SDK_RF_BASE_ERR-6); // PROTOCOL ERROR
public static final int SDK_RF_TRANSMISSION_ERROR = (SDK_RF_BASE_ERR-7); // Transmission
error

//magnetic card
public static final int SDK_MAG_BASE_ERR = -1100;
public static final int SDK_MAG_ERROR = (SDK_MAG_BASE_ERR-1); //Error
public static final int SDK_MAG_PARAM_ERROR = (SDK_MAG_BASE_ERR-2); //Param error
public static final int SDK_MAG_NO_BRUSH = (SDK_MAG_BASE_ERR-3);//No brush card

//printer
public static final int SDK_PRN_BASE_ERR = -1400;
public static final int SDK_PRN_ERROR = (SDK_PRN_BASE_ERR-1) ; //Error
public static final int SDK_PRN_PARAM_ERROR = (SDK_PRN_BASE_ERR-2) ; //Param
error
public static final int SDK_PRN_STATUS_PAPEROUT = (SDK_PRN_BASE_ERR-3) ; //Paper out
public static final int SDK_PRN_STATUS_TOOHEAT = (SDK_PRN_BASE_ERR-4) ; //Too heat
public static final int SDK_PRN_STATUS_FAULT = (SDK_PRN_BASE_ERR-5) ; //Device
fault
public static final int SDK_PRN_STATUS_PRINTING = (SDK_PRN_BASE_ERR-6) ; //Is printing

//PinPad
public static final int SDK_PAD_BASE_ERR = -1500 ;
public static final int SDK_PAD_ERR_NOPIN = (SDK_PAD_BASE_ERR -10); //press ENTER
directly when enter PIN (no PIN)s
public static final int SDK_PAD_ERR_CANCEL = (SDK_PAD_BASE_ERR-11); //press CANCEL
to quit enter PIN
public static final int SDK_PAD_ERR_TIMEOUT = (SDK_PAD_BASE_ERR-12); //timeout when
enter PIN
public static final int SDK_PAD_ERR_NEED_WAIT = (SDK_PAD_BASE_ERR-13); //two frequent
between 2 sensitive API, call PIN less than 30s
public static final int SDK_PAD_ERR_DUPLI_KEY = (SDK_PAD_BASE_ERR-14); //duplicate key
public static final int SDK_PAD_ERR_INVALID_INDEX = (SDK_PAD_BASE_ERR-15); //invalid key
index
public static final int SDK_PAD_ERR_NOTSET_KEY = (SDK_PAD_BASE_ERR-16); //not set key
(no key)
public static final int SDK_PAD_ERR_EXCEPTION = (SDK_PAD_BASE_ERR-17); // The password
keyboard is not working properly.

//silent install
public static final int SDK_INSTALL_SUCCESS = 0; // Silent
installation/uninstallation succeeded
public static final int SDK_INSTALL_ERROR = -1; // Silent

98
installation/uninstallation failed
public static final int SDK_INSTALL_NONE = 1000;//Default status
public static final int SDK_INSTALLING = 1; // Silent
installation/uninstallation in progress
public static final int SDK_NO_SIGNATURE = -2; // Apk no signature
public static final int SDK_SIGNATURE_ERROR = -3; // Signature error

FingerResult

public static final int RESULT_OK = 0x00;


public static final int TRANSFER_ERROR = 0x01;
public static final int NO_FINGER_DETECTED = 0x02;
public static final int ENCROLL_FAILED = 0x03;
public static final int DRY_AND_LIGHT_IMAGE = 0x04;
public static final int WET_AND_SLOPPY_IMAGE = 0x05;
public static final int MESSY_IMAGE = 0x06;
public static final int FAILD_EXTRACT_MINITIAE = 0x07;
public static final int VERIFY_NOT_MATCH = 0x08;
public static final int IDENTIFY_NOT_FIND = 0x09;
public static final int FEATURE_MERGE_FAILED = 0x0A;
public static final int FINGER_ID_OUT_OF_BOUND = 0x0B;
public static final int TEMPLATE_TRANSFER_INVALID = 0x0C;
public static final int UPLOAD_FETURE_FAILED = 0x0D;
public static final int RECV_REMAIN_DATA_ERROR = 0x0E;
public static final int DELETE_TEMPLATE_FAILED = 0x10;
public static final int EMPTY_TEMPLATE_FAILED = 0x11;
public static final int NO_VALID_IAMGE = 0x15;
public static final int FLASH_OPT_FAILED = 0x18;
public static final int INVALID_REGISTER_NUM = 0x1A;
public static final int REGISTER_SETTING_ERROR_NUM = 0x1B;
public static final int TEMPLATE_IS_EMPTY = 0x27;
public static final int WRONG_OPT_SEQUENCE = 0x30;
public static final int TEMPLATE_NUM_ERROR = 0x31;
public static final int NO_TEMPLATE_ID = 0x32;
public static final int WRONG_LOCATION_ERROR = 0x33;
public static final int UNKNOWN_ERROR = 0x19;
public static final int GET_IMAGE_TIMEOUT = 0x1C;
public static final int CHECK_VALUE_ERROR = 0x1D;
public static final int NO_PERMISSION = 0xFE;
public static final int NO_SUPPORTED_CMD = 0xFF;

99

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy