IDTech Android SDK Guide  1.00.057
API reference for Kiosk III
com.idtechproducts.device.IDT_KioskIII Class Reference

Public Member Functions

 IDT_KioskIII (OnReceiverListener callback, Context context)
 
boolean device_setDeviceType (ReaderInfo.DEVICE_TYPE deviceType)
 
 IDT_KioskIII (OnReceiverListener callback, Context context, boolean isSRED)
 
boolean device_setDeviceType (ReaderInfo.DEVICE_TYPE deviceType, boolean isSRED)
 
void setIDT_Device (FirmwareUpdateTool fwTool)
 
boolean device_isSRED ()
 
DEVICE_TYPE device_getDeviceType ()
 
void registerListen ()
 
void unregisterListen ()
 
void release ()
 
String config_getSDKVersion ()
 
String config_getXMLVersionInfo ()
 
String phone_getInfoManufacture ()
 
String phone_getInfoModel ()
 
void log_setVerboseLoggingEnable (boolean enable)
 
void log_setSaveLogEnable (boolean enable)
 
int log_deleteLogs ()
 
void config_setXMLFileNameWithPath (String path)
 
boolean config_loadingConfigurationXMLFile (boolean updateAutomatically)
 
boolean device_connectWithProfile (StructConfigParameters profile)
 
boolean device_isConnected ()
 
int device_startRKI ()
 
int device_setMerchantRecord (int index, boolean enabled, String merchantID, String merchantURL)
 
int device_getMerchantRecord (int index, ResDataStruct respData)
 
int device_getFirmwareVersion (StringBuilder version)
 
int device_pingDevice ()
 
int device_setBurstMode (byte mode)
 
int device_setPollMode (byte mode)
 
int device_controlUserInterface (byte[] values)
 
int device_getTransactionResults (IDTMSRData cardData)
 
int config_getSerialNumber (StringBuilder serialNumber)
 
String device_getResponseCodeString (int errorCode)
 
int device_sendDataCommand (String cmd, boolean calcLRC, String data, ResDataStruct respData)
 
int device_sendDataCommand (String cmd, boolean calcLRC, String data, ResDataStruct respData, int timeout)
 
int device_updateFirmware (String[] commands)
 
int device_reviewAllSetting (ResDataStruct respData)
 
int icc_passthroughOnICC ()
 
int icc_passthroughOffICC ()
 
int ctls_retrieveApplicationData (String aid, ResDataStruct respData)
 
int ctls_removeApplicationData (String aid, ResDataStruct respData)
 
int ctls_setApplicationData (byte[] TLV, ResDataStruct respData)
 
int ctls_setConfigurationGroup (byte[] TLV, ResDataStruct respData)
 
int ctls_retrieveTerminalData (ResDataStruct respData)
 
int ctls_setTerminalData (byte[] TLV, ResDataStruct respData)
 
int ctls_retrieveAidList (ResDataStruct respData)
 
int ctls_retrieveCAPK (byte[] data, ResDataStruct respData)
 
int ctls_removeCAPK (byte[] capk, ResDataStruct respData)
 
int ctls_setCAPK (byte[] key, ResDataStruct respData)
 
int ctls_retrieveCAPKList (ResDataStruct respData)
 
int ctls_removeAllApplicationData ()
 
int ctls_removeAllCAPK ()
 
int ctls_startTransaction (double amount, double amtOther, int type, final int timeout, byte[] tags)
 
int ctls_cancelTransaction ()
 

Static Public Member Functions

static IDT_Device getIDT_Device ()
 

Constructor & Destructor Documentation

com.idtechproducts.device.IDT_KioskIII.IDT_KioskIII ( OnReceiverListener  callback,
Context  context 
)

It is the constructor of the main class IDT_KioskIII. When it is called, the SDK will create the Instance for IDT_KioskIII device. The interface OnReceiverListner needs to be implemented in the application.

Parameters
callbackOnReceiverListener callback
contextApplication context
com.idtechproducts.device.IDT_KioskIII.IDT_KioskIII ( OnReceiverListener  callback,
Context  context,
boolean  isSRED 
)

It is the constructor of the main class IDT_KioskIII. When it is called, the SDK will create the Instance for IDT_Augusta device. The interface OnReceiverListner needs to be implemented in the application.

Parameters
callbackOnReceiverListener callback
contextApplication context
isSREDTrue if SRED device

Member Function Documentation

String com.idtechproducts.device.IDT_KioskIII.config_getSDKVersion ( )

READER CONFIG API LIST Get the version of SDK.

Parameters
sdkVersionfor version string.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.config_getSerialNumber ( StringBuilder  serialNumber)

Get the serial number of device.

Parameters
serialNumberreturns Serial Number string.
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
String com.idtechproducts.device.IDT_KioskIII.config_getXMLVersionInfo ( )

Get XML configuration version.

Returns
the version info.
boolean com.idtechproducts.device.IDT_KioskIII.config_loadingConfigurationXMLFile ( boolean  updateAutomatically)

Load XML Configuration File.

Parameters
xmlFilename,XMLConfiguration File Name.
Returns
none
void com.idtechproducts.device.IDT_KioskIII.config_setXMLFileNameWithPath ( String  path)

set XML Configuration File Name with the full path.

Parameters
xmlFilename,XMLConfiguration File Name.
Returns
none
int com.idtechproducts.device.IDT_KioskIII.ctls_cancelTransaction ( )

Cancel CTLS (or MSR) Transaction

Cancels the currently executing CTLS transaction (or MSR swipe request).

Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_removeAllApplicationData ( )

Remove all Application Data

Removes all the Application Data

Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_removeAllCAPK ( )

Remove All Certificate Authority Public Key

Removes all CAPK

Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_removeApplicationData ( String  aid,
ResDataStruct  respData 
)

Remove Application Data

Removes the Application Data as specified by the AID name passed as a parameter

Parameters
aidAid file to remove.
respDataStatus Code in ResDataStruct.statusCode. If no application data exists, status code will be 0x60. Format error status code 0x05
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_removeCAPK ( byte[]  capk,
ResDataStruct  respData 
)

Remove Certificate Authority Public Key

Removes the CAPK as specified by the RID/Index

Parameters
capk6 byte CAPK = 5 bytes RID + 1 byte INDEX
respDataStatus Code in ResDataStruct.statusCode.
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_retrieveAidList ( ResDataStruct  respData)

Retrieve Aid List

Returns all the AID names installed on the terminal.

Parameters
respDataArray of AID string names passed back in ResDataStruct.stringArray. Status Code in ResDataStruct.statusCode. If no AIDs exists, status code will be 0x60
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_retrieveApplicationData ( String  aid,
ResDataStruct  respData 
)

Allow fallback for EMV transactions. Default is TRUE

Parameters
allowTRUE = allow fallback, FALSE = don't allow fallback Retrieve Application Data

Retrieves the TLV values of a provide AID.

Parameters
aidAid file to retrieve.
respDataReturns TLV in ResDataStruct.resData. Status Code in ResDataStruct.statusCode. If no application data exists, status code will be 0x60
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_retrieveCAPK ( byte[]  data,
ResDataStruct  respData 
)

Retrieve Certificate Authority Public Key

Retrieves the CAPK as specified by the RID/Index passed as a parameter.

Parameters
capk6 bytes CAPK = 5 bytes RID + 1 byte Index
keyResponse returned in ResDataStruct.resData: [5 bytes RID][1 byte Index][1 byte Hash Algorithm][1 byte Encryption Algorithm][20 bytes HashValue][4 bytes Public Key Exponent][2 bytes Modulus Length][Variable bytes Modulus] Where:
  • Hash Algorithm: The only algorithm supported is SHA-1.The value is set to 0x01
  • Encryption Algorithm: The encryption algorithm in which this key is used. Currently support only one type: RSA. The value is set to 0x01.
  • HashValue: Which is calculated using SHA-1 over the following fields: RID & Index & Modulus & Exponent
  • Public Key Exponent: Actually, the real length of the exponent is either one byte or 3 bytes. It can have two values: 3 (Format is 0x00 00 00 03), or 65537 (Format is 0x00 01 00 01)
  • Modulus Length: LenL LenH Indicated the length of the next field.
  • Modulus: This is the modulus field of the public key. Its length is specified in the field above.
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_retrieveCAPKList ( ResDataStruct  respData)

Retrieve the Certificate Authority Public Key list

Returns all the CAPK RID and Index installed on the terminal.

Parameters
respDataResDataStruct.resData = [key1][key2]...[keyn], each key 6 bytes where key = 5 bytes RID + 1 byte index
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_retrieveTerminalData ( ResDataStruct  respData)

Retrieve Terminal Data

Retrieves the TLV values of a the terminal.

Parameters
respDataReturns TLV in ResDataStruct.resData. Status Code in ResDataStruct.statusCode. If no terminal data exists, status code will be 0x60
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_setApplicationData ( byte[]  TLV,
ResDataStruct  respData 
)

Set Application Data by AID

Sets the Application Data for CTLS as specified by the TLV data

Parameters
tlvApplication data in TLV format The first tag of the TLV data must be the group number (FFE4). The second tag of the TLV data must be the AID (9F06)

Example valid TLV, for Group #2, AID a0000000035010: "ffe401029f0607a0000000051010ffe10101ffe50110ffe30114ffe20106"

Returns
RETURN_CODE: Values can be parsed with errorCode.getErrorString()
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_setCAPK ( byte[]  key,
ResDataStruct  respData 
)

Set Certificate Authority Public Key

Sets the CAPK as specified by the CAKey structure

Parameters
keyCAKey format: [5 bytes RID][1 byte Index][1 byte Hash Algorithm][1 byte Encryption Algorithm][20 bytes HashValue][4 bytes Public Key Exponent][2 bytes Modulus Length][Variable bytes Modulus] Where:
  • Hash Algorithm: The only algorithm supported is SHA-1.The value is set to 0x01
  • Encryption Algorithm: The encryption algorithm in which this key is used. Currently support only one type: RSA. The value is set to 0x01.
  • HashValue: Which is calculated using SHA-1 over the following fields: RID & Index & Modulus & Exponent
  • Public Key Exponent: Actually, the real length of the exponent is either one byte or 3 bytes. It can have two values: 3 (Format is 0x00 00 00 03), or 65537 (Format is 0x00 01 00 01)
  • Modulus Length: LenL LenH Indicated the length of the next field.
  • Modulus: This is the modulus field of the public key. Its length is specified in the field above.
respDataStatus Code in ResDataStruct.statusCode.
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_setConfigurationGroup ( byte[]  TLV,
ResDataStruct  respData 
)

Set Configuration Data for AID Group

Sets the Configuration Data for CTLS as specified by the TLV data

Parameters
tlvConfiguration data in TLV format The first tag of the TLV data must be the group number (FFE4). A second tag must exisdt
Returns
RETURN_CODE: Values can be parsed with errorCode.getErrorString()
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_setTerminalData ( byte[]  TLV,
ResDataStruct  respData 
)

Set Terminal Data

Sets the Terminal Data as specified by the TerminalData structure passed as a parameter

Parameters
TLVTerminalData configuration file.
respDataStatus Code in ResDataStruct.statusCode. If Flash error, status code will be 0x62. Format error status code 0x05
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.ctls_startTransaction ( double  amount,
double  amtOther,
int  type,
final int  timeout,
byte[]  tags 
)

Start CTLS (or MSR) Transaction Request

Authorizes the CTLS (or MSR) transaction for an ICC card

The tags will be returned in the callback routine.

Parameters
amountTransaction amount value (tag value 9F02)
amtOtherOther amount value, if any (tag value 9F03)
typeTransaction type (tag value 9C).
timeoutTimeout value in seconds.
tagsAny other tags to be included in the request. Passed as a string. Example, tag 9F0C with amount 0x000000000100 would be "9F0C06000000000100" If tags 9F02 (amount),9F03 (other amount), or 9C (transaction type) are included, they will take priority over these values supplied as individual parameters to this method. Note: To request tags to be included in default response, use tag DFEE1A, and specify tag list. Example four tags 9F02, 9F36, 95, 9F37 to be included in response = DFEE1A079F029F369f9F37
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
boolean com.idtechproducts.device.IDT_KioskIII.device_connectWithProfile ( StructConfigParameters  profile)

connect the device with Profile.

Parameters
profile,theprofile is the one which is the result from Auto config.
Returns
none
int com.idtechproducts.device.IDT_KioskIII.device_controlUserInterface ( byte[]  values)

Control User Interface

Controls the User Interface: Display, Beep, LED

Parameters
valuesFour bytes to control the user interface Byte[0] = LCD Message Messages 00-07 are normally controlled by the reader.
  • 00h: Idle Message (Welcome)
  • 01h: Present card (Please Present Card)
  • 02h: Time Out or Transaction cancel (No Card)
  • 03h: Transaction between reader and card is in the middle (Processing...)
  • 04h: Transaction Pass (Thank You)
  • 05h: Transaction Fail (Fail)
  • 06h: Amount (Amount $ 0.00 Tap Card)
  • 07h: Balance or Offline Available funds (Balance $ 0.00) Messages 08-0B are controlled by the terminal
  • 08h: Insert or Swipe card (Use Chip & PIN)
  • 09h: Try Again(Tap Again)
  • 0Ah: Tells the customer to present only one card (Present 1 card only)
  • 0Bh: Tells the customer to wait for authentication/authorization (Wait)
  • FFh: indicates the command is setting the LED/Buzzer only. Byte[1] = Beep Indicator
  • 00h: No beep
  • 01h: Single beep
  • 02h: Double beep
  • 03h: Three short beeps
  • 04h: Four short beeps
  • 05h: One long beep of 200 ms
  • 06h: One long beep of 400 ms
  • 07h: One long beep of 600 ms
  • 08h: One long beep of 800 ms Byte[2] = LED Number
  • 00h: LED 0 (Power LED) 01h: LED 1
  • 02h: LED 2
  • 03h: LED 3
  • FFh: All LEDs Byte[3] = LED Status
  • 00h: LED Off
  • 01h: LED On
Returns
RETURN_CODE: Values can be parsed with errorCode.getErrorString()
DEVICE_TYPE com.idtechproducts.device.IDT_KioskIII.device_getDeviceType ( )

Gets type of device

int com.idtechproducts.device.IDT_KioskIII.device_getFirmwareVersion ( StringBuilder  version)

DEVICE INFO API Get the firmware version of device.

Parameters
versionfor version string.
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.device_getMerchantRecord ( int  index,
ResDataStruct  respData 
)

Get Merchant Record

Gets the merchant record for the device.

Parameters
respDataresponse data from reader. Merchant Record Index: 1 byte enabled: 1 byte Merchant ID: 32 bytes Length of Merchant URL: 1 byte Merchant URL: 64 bytes
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
String com.idtechproducts.device.IDT_KioskIII.device_getResponseCodeString ( int  errorCode)

Get Response Code String

Interpret a response code and return string description.

Parameters
errorCodeError code, range 0x0000 - 0xFFFF, example 0x0300
Returns
Verbose error description
int com.idtechproducts.device.IDT_KioskIII.device_getTransactionResults ( IDTMSRData  cardData)

Get Transaction Results Gets the transaction results when the reader is functioning in "Auto Poll" mode

Parameters
cardDataThe transaction results
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
boolean com.idtechproducts.device.IDT_KioskIII.device_isConnected ( )

get the status if the device connected.

Returns
true: connected, false: disconnected
boolean com.idtechproducts.device.IDT_KioskIII.device_isSRED ( )

Check if the device is SRED

Returns
true if it is SRED, otherwise false.
int com.idtechproducts.device.IDT_KioskIII.device_pingDevice ( )

Ping Device

Pings the reader. If connected, returns success. Otherwise, returns timeout.

Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.device_reviewAllSetting ( ResDataStruct  respData)

Review All Configuration Settings

it returns the current values for all the parameters that can be set using the Set Configuration command. Each parameter is returned as a TLV data object. Floor Limits for different AIDs are preceded by the TLV of the specific AID associated with that object.

Parameters
aidAid file to retrieve.
respDataReturns TLV in ResDataStruct.resData. Status Code in ResDataStruct.statusCode. If no application data exists, status code will be 0x60
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.device_sendDataCommand ( String  cmd,
boolean  calcLRC,
String  data,
ResDataStruct  respData 
)

Sends a Direct Command Sends a NEO IDG ViVOtech 2.0 command

Parameters
commandTwo bytes command (including subCommand) as per NEO IDG Reference Guide (UniPayIII)
calcLRCNot used for IDG devices
dataCommand data (if applicable) for IDG devices
responseReturns response ResDataStruct.resData. Status Code in ResDataStruct.statusCode
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.device_sendDataCommand ( String  cmd,
boolean  calcLRC,
String  data,
ResDataStruct  respData,
int  timeout 
)

Sends a Direct Command Sends a NEO IDG ViVOtech 2.0 command

Parameters
commandTwo bytes command (including subCommand) as per NEO IDG Reference Guide (UniPayIII)
calcLRCNot used for IDG devices
dataCommand data (if applicable) for IDG devices
responseReturns response ResDataStruct.resData. Status Code in ResDataStruct.statusCode
timeoutCommand timeout
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.device_setBurstMode ( byte  mode)

Set Burst Mode

Sets the burst mode for the device.

Parameters
mode0 = OFF, 1 = Always On, 2 = Auto Exit
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
boolean com.idtechproducts.device.IDT_KioskIII.device_setDeviceType ( ReaderInfo.DEVICE_TYPE  deviceType)

Defines connection USB or Audio Jack

Parameters
deviceTypeDEVICE_TYPE.IDT_KioskIII
boolean com.idtechproducts.device.IDT_KioskIII.device_setDeviceType ( ReaderInfo.DEVICE_TYPE  deviceType,
boolean  isSRED 
)

Defines connection USB

Parameters
deviceTypeDEVICE_TYPE.DEVICE_KIOSK_III
isSREDTrue if SRED device
int com.idtechproducts.device.IDT_KioskIII.device_setMerchantRecord ( int  index,
boolean  enabled,
String  merchantID,
String  merchantURL 
)

Set Merchant Record

Sets the merchant record for the device.

Parameters
indexMerchant Record Index. The valid value is 1–6.
enabled1: The Merchant ID is valid, 0: The Merchant ID is not valid.
merchantIDThe tag is 9F25.
merchantURLThe tag is 9F29.
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.device_setPollMode ( byte  mode)

Set Poll Mode

Sets the poll mode for the device. Auto Poll keeps reader active, Poll On Demand only polls when requested by terminal

Parameters
mode0 = Auto Poll, 1 = Poll On Demand
Returns
RETURN_CODE: Values can be parsed with errorCode.getErrorString()
int com.idtechproducts.device.IDT_KioskIII.device_startRKI ( )

Start remote key injection.

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.device_updateFirmware ( String[]  commands)

DEVICE INFO API Update the firmware of device.

Parameters
commandsfor all the lines/commands of the firmware text file.
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.icc_passthroughOffICC ( )

Disables pass through mode for ICC. Required when executing transactions (start EMV, start MSR, authenticate transaction)

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.icc_passthroughOnICC ( )

DEVICE INFO API Update the firmware of device.

Parameters
commandsfor all the lines/commands of the firmware text file.
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode Enables pass through mode for ICC. Required when direct ICC commands are required (power on/off ICC, exchange APDU)
Returns
success or error code. Values can be parsed with device_getResponseCodeString
See also
ErrorCode
int com.idtechproducts.device.IDT_KioskIII.log_deleteLogs ( )

delete the log in the root path of SD card.

Returns
none
See also
log_setSaveLogEnable
void com.idtechproducts.device.IDT_KioskIII.log_setSaveLogEnable ( boolean  enable)

Enable/Disable save the log into the root path of SD card.

Parameters
enableShowLog,trueenable save the log, the log includes the .txt text log and .wav signals file. false: disable save the log.
Returns
none
See also
deleteLogs
void com.idtechproducts.device.IDT_KioskIII.log_setVerboseLoggingEnable ( boolean  enable)

Enable/Disable Verbose Logging show in the logcat view window.

Parameters
enableShowLog,trueenable to show the log in the logcat view window. false: disable to show the log in the logcat view window.
Returns
none
String com.idtechproducts.device.IDT_KioskIII.phone_getInfoManufacture ( )

Get manufacture version.

Returns
the manufacture info
String com.idtechproducts.device.IDT_KioskIII.phone_getInfoModel ( )

Get phones's model number information.

Returns
the model number information.
void com.idtechproducts.device.IDT_KioskIII.registerListen ( )

General API:registerListen.

registerListen to enable SDK detect the phone jack plug in/off notification

void com.idtechproducts.device.IDT_KioskIII.release ( )

release, make the SDK in the idle status.

void com.idtechproducts.device.IDT_KioskIII.setIDT_Device ( FirmwareUpdateTool  fwTool)

For System Use Only

Parameters
fwToolParameter for firmware update
void com.idtechproducts.device.IDT_KioskIII.unregisterListen ( )

unregisterListen to disable the detect


The documentation for this class was generated from the following file: