UniPay SDK Guide for Android  0.02.011
API reference
 All Data Structures Functions Variables Pages
com.idtechproducts.device.IDT_Device Class Reference

Public Member Functions

 IDT_Device (OnReceiverListener callback, Context contex)
 
void registerListen ()
 
void unregisterListen ()
 
void release ()
 
String config_getXMLVersionInfo ()
 
String phone_getInfoManufacture ()
 
String phone_getInfoModel ()
 
void log_setVerboseLoggingEnable (boolean enableShowLog)
 
void log_setSaveLogEnable (boolean enable)
 
int log_deleteLogs ()
 
void config_setXMLFileNameWithPath (String xmlFilename)
 
boolean config_loadingConfigurationXMLFile (boolean updateAutomatically)
 
boolean device_connect ()
 
void device_disconnect ()
 
boolean device_isConnected ()
 
boolean device_connectWithProfile (StructConfigParameters profile)
 
boolean msr_isSwipeCardRunning ()
 
int config_getSDKVersion (StringBuilder sdkVersion)
 
int config_getModelNumber (StringBuilder modNumber)
 
int config_getSerialNumber (StringBuilder serialNumber)
 
int config_setSerialNumber (String serNumber)
 
int config_getDateTime (StringBuilder dateTime)
 
int config_setDateTime (String dateTime)
 
int config_getInterfaceDeviceSN (StringBuilder serialNumber)
 
int config_setInterfaceDeviceSN (String serNumber)
 
int config_getTerminalIdentification (StringBuilder termIden)
 
int config_setTerminalIdentification (String termIden)
 
int device_getFirmwareVersion (StringBuilder version)
 
int device_getBatteryVoltage (StringBuilder batteryInfo)
 
int device_ReviewAudioJackSetting (int response[])
 
int device_rebootDevice ()
 
int device_enableBeep (boolean enable)
 
int device_sendBeep (int frequency, int duration)
 
int device_sendCommandDirectIO (String hexCommand, ResDataStruct respData)
 
String device_getResponseCodeString (int errorCode)
 
int icc_getICCReaderStatus (ICCReaderStatusStruct ICCStatus)
 
int icc_powerOnICC (PowerOnStructure options, ResDataStruct atrPPS)
 
int icc_powerOffICC ()
 
int icc_exchangeAPDU (byte[] dataAPDU, APDUResponseStruct response)
 
int icc_exchangeEncryptedAPDU (byte[] dataAPDU, byte[] ksn, APDUResponseStruct response)
 
int icc_exchangeMultiAPDU (byte[] dataAPDU, ResDataStruct respData)
 
int icc_getCurrentKSN (ResDataStruct resKSN)
 
int icc_Set3VThen5V ()
 
int icc_Set5V ()
 
int icc_enableNotification (boolean enableNotifyICCStatus)
 
int icc_setICCConnector (byte connector)
 
int icc_setProAndPostPanLength (int prePanCtrlDataLen, int postPanCtrlDataLen)
 
int icc_setAsciiMask (byte maskWithAscii)
 
int icc_setBCDMask (byte maskWithBCD)
 
int icc_defaultSetting ()
 
int icc_reviewAllSetting (ICCSettingStruct iccSetting)
 
int lcd_clearDisplay (byte control)
 
int lcd_savePromptDisplay (int numPrompt, String message)
 
int lcd_displayPrompt (int numLine, int numPrompt)
 
int lcd_displayMessage (int numLine, String message)
 
int lcd_enableSleepMode (boolean sleepMode)
 
int lcd_defaultSetting ()
 
int lcd_getSetting (boolean[] sleepMode)
 
int msr_reviewAllSetting (MSRSettingStruct msrSetting)
 
int msr_defaultAllSetting ()
 
int msr_getSingleSetting (byte funcID, byte[] response)
 
int msr_setSingleSetting (byte funcID, byte setData)
 
int msr_startMSRSwipe ()
 
int msr_cancelMSRSwipe ()
 
int autoConfig_start (String strXMLFilename, boolean fastSearch)
 
void autoConfig_stop ()
 
void stopWaitingTask ()
 
boolean setWaitingMSRResponseTimeout (int timeoutValue)
 
boolean setWaitingExchangeAPDUResponseTimeout (int timeoutValue)
 
boolean setWaitingPINResponseTimeout (int timeoutValue)
 
void setEMVListener (OnReceiverListener callback)
 
ReaderType getAttachedReaderType ()
 
SupportStatus getSupportStatus (ReaderType readerType)
 
SupportStatus getSupportStatus ()
 

Data Fields

UMLog LOG
 

Detailed Description

The IDTech Framework is an Android Framework that will be provided by IDTech as the main interface between Android applications and UniPay reader processing solutions. The purpose of this document is to describe the requirements of the frameworks as well as the interface definitions and requirements needed for any Android applications wishing to deploy with the payment application.

Constructor & Destructor Documentation

com.idtechproducts.device.IDT_Device.IDT_Device ( OnReceiverListener  callback,
Context  contex 
)
inline

It is the constructor of the main class IDT_Device. When it is called, the SDK will create the Instance for UniPay reader device. The interface UniPayReaderMsg as the callback function need be implemented in the application.

It's better to call the constructor When android activity is created.

Member Function Documentation

int com.idtechproducts.device.IDT_Device.autoConfig_start ( String  strXMLFilename,
boolean  fastSearch 
)
inline

start Auto Config to search the profile.

Parameters
strXMLFilenameInput the customized XML file as the templates to search the profile.
fastSearchThere are two steps to search the profile:
First to search in the templates inside of XML file,
Second is to search with emumerate posible templates by experiense.

If fastSearch is true, the search will skip the second step.
If fastSearch is false, the search will cover the two steps.
Returns
success or error code.
See also
ErrorCode
void com.idtechproducts.device.IDT_Device.autoConfig_stop ( )
inline

stop Auto Config.

Returns
null.
int com.idtechproducts.device.IDT_Device.config_getDateTime ( StringBuilder  dateTime)
inline

Get the date and time of device.

Parameters
dateTimethe device's date and time, 20121123122459.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.config_getInterfaceDeviceSN ( StringBuilder  serialNumber)
inline

Get interface device's serial number.

Parameters
serialNumberfor interface device's serial number string.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.config_getModelNumber ( StringBuilder  modNumber)
inline

Get the model number of device.

Parameters
modNumberfor Model Number.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.config_getSDKVersion ( StringBuilder  sdkVersion)
inline

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_Device.config_getSerialNumber ( StringBuilder  serialNumber)
inline

Get the serial number of device.

Parameters
serialNumberfor Serial Number.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.config_getTerminalIdentification ( StringBuilder  termIden)
inline

Get Get terminal identification.

Parameters
termIdenfor device terminal identification string.
Returns
success or error code.
See also
ErrorCode
String com.idtechproducts.device.IDT_Device.config_getXMLVersionInfo ( )
inline

Get XML configuration version.

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

Load XML Configuration File.

Parameters
xmlFilename,XMLConfiguration File Name.
Returns
none
int com.idtechproducts.device.IDT_Device.config_setDateTime ( String  dateTime)
inline

Set the date and time to device.

Parameters
dateTimethe date and time in hex string,12 characters.If date is: 2012/11/23 12:24:59, dateTime should be 121123122459.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.config_setInterfaceDeviceSN ( String  serNumber)
inline

Set Interface device's serial number. EMV serial Number can be set only once.

Parameters
serNumberfor Serial Number string;8 bytes '0' ~ '9', or 'a' ~ 'z', or 'A' ~ 'Z'.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.config_setSerialNumber ( String  serNumber)
inline

Set the serial number to device.

Parameters
serNumberfor Serial Number string; 9 (UniPay) or 10 (UniPay II) bytes ASCII, from 0x20 to 0x7F.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.config_setTerminalIdentification ( String  termIden)
inline

Set terminal identification.

Parameters
termIdenfor terminal identification string;8 bytes '0' ~ '9', or 'a' ~ 'z', or 'A' ~ 'Z'.
Returns
success or error code.
See also
ErrorCode
void com.idtechproducts.device.IDT_Device.config_setXMLFileNameWithPath ( String  xmlFilename)
inline

set XML Configuration File Name with the full path.

Parameters
xmlFilename,XMLConfiguration File Name.
Returns
none
boolean com.idtechproducts.device.IDT_Device.device_connect ( )
inline

Connect the device.

Returns
success or error code.
boolean com.idtechproducts.device.IDT_Device.device_connectWithProfile ( StructConfigParameters  profile)
inline

connect the device with Profile.

Parameters
profile,theprofile is the one which is the result from Auto config.
Returns
none
void com.idtechproducts.device.IDT_Device.device_disconnect ( )
inline

Disconnect the device.

Returns
none
int com.idtechproducts.device.IDT_Device.device_enableBeep ( boolean  enable)
inline

Control the device's beeper.

Parameters
enabletrue: enable beep, false: disable to beep.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.device_getBatteryVoltage ( StringBuilder  batteryInfo)
inline

DEVICE INFO API Get the Battery Voltage information of device.

Parameters
batteryInfofor battery Voltage Info string.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.device_getFirmwareVersion ( StringBuilder  version)
inline

DEVICE INFO API Get the firmware version of device.

Parameters
versionfor version string.
Returns
success or error code.
See also
ErrorCode
String com.idtechproducts.device.IDT_Device.device_getResponseCodeString ( int  errorCode)
inline

Get Response Code String.

Parameters
errorCodeError code returns by other APIs.
Returns
the string for error code.
boolean com.idtechproducts.device.IDT_Device.device_isConnected ( )
inline

get the status if the device connected.

Returns
true: connected, false: disconnected
int com.idtechproducts.device.IDT_Device.device_rebootDevice ( )
inline

Reboot device.The device will restart and need to reconnect device if success.

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.device_ReviewAudioJackSetting ( int  response[])
inline

Retrieves Audio Jack setting.

Parameters
responseresponse[0]: baud rate of the device connected.
response[1]: level option of the device output signals.
response[2]: the number of prefix "55", and end with "66".
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.device_sendBeep ( int  frequency,
int  duration 
)
inline

Control the device's beeper.

Parameters
frequencythe Frequency of beeper;the range from 1000 to 20000.
durationthe duration of beeper; the range from 16 to 65536.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.device_sendCommandDirectIO ( String  hexCommand,
ResDataStruct  respData 
)
inline

Send the command body directly.

Parameters
hexCommandthe command body to send to the device.
For example, get the firmware version command: "724601"
responsethe response from the device.

Usage about this API, for example to get the firmware version:

byte[] response = null;
device_sendCommandDirectIO("724601",response);

Returns
success or error code.
See also
ErrorCode
ReaderType com.idtechproducts.device.IDT_Device.getAttachedReaderType ( )
inline

Return the type of reader currently attached and powered up.

Returns UNKNOWN If reader is not attached or not powered up, or if the reader type cannot be determined. Returns the reader type.

SupportStatus com.idtechproducts.device.IDT_Device.getSupportStatus ( ReaderType  readerType)
inline

Return return the reader support status as specified in the configuration readerType: UNIPAYII file the SDK loaded. Returns the support status.

SupportStatus com.idtechproducts.device.IDT_Device.getSupportStatus ( )
inline

Return return the reader support status as specified in the configuration file the SDK loaded. Returns the support status.

int com.idtechproducts.device.IDT_Device.icc_defaultSetting ( )
inline

Default ICC group all setting.

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_enableNotification ( boolean  enableNotifyICCStatus)
inline

Enable / Disable the ICC notification. When enable the notification, the SDK will always post the event when ICC card plug in or out.

Parameters
enableNotifyICCStatus,trueenable the ICC status notification; false:disable the ICC status notification.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_exchangeAPDU ( byte[]  dataAPDU,
APDUResponseStruct  response 
)
inline

Exchange APDU between the currently selected microprocessor card in the ICC reader. The max length of APDU is 512 bytes and the C-APDU is Plaintext.

Parameters
dataAPDUPlaintext APDU data buffer.
responsethe class for response APDU,please see class APDUResponseStruct for more information.
The format of Raw response APDU Data Structure of [n bytes Encrypted R-APDU without Status Bytes] is below:
2 bytes Valid R-APDU Length + x bytes Valid R-APDU without Status Bytes + y bytes Padding.
See also
APDUResponseStruct
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_exchangeEncryptedAPDU ( byte[]  dataAPDU,
byte[]  ksn,
APDUResponseStruct  response 
)
inline

Exchange APDU between the currently selected microprocessor card in the ICC reader.
The max length of APDU is 512 bytes and the C-APDU is Encrypted.

Parameters
dataAPDUEncrypted APDU data buffer.
The format of Raw C-APDU Data Structure of [m bytes Encrypted C-APDU] is below:
m = 2 bytes Valid C-APDU Length + x bytes Valid C-APDU + y bytes Padding (0x00).
ksn10 bytes Key Serial Number.
responsethe class for response APDU,please see class APDUResponseStruct for more information.
The format of Raw response APDU Data Structure of [n bytes Encrypted R-APDU] is below:.
2 bytes Valid R-APDU Length + x bytes Valid R-APDU + y bytes Padding.
See also
APDUResponseStruct
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_exchangeMultiAPDU ( byte[]  dataAPDU,
ResDataStruct  respData 
)
inline

Exchange Multiple APDUs between the currently selected microprocessor card in the ICC reader.
This API is for UniPay device only.

Parameters
dataAPDUPlaintext APDU data buffer.
respDatathe data buffer respond from the device
RPDU Packet format as follows:
[Number of APDU commands]
[R-APDU 1 length] [R-APDU 1 Command]
'
'
[R-APDU n length] [R-APDU n command]
See also
ResDataStruct
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_getCurrentKSN ( ResDataStruct  resKSN)
inline

Get the current KSN for Smart card. * The KSN in the Response should be the KSN in the loop exchanging until ICC is powered off.

Parameters
resKSNthe class for current KSN.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_getICCReaderStatus ( ICCReaderStatusStruct  ICCStatus)
inline

Get ICC Reader microprocessor card status.

Parameters
ICCStatusthe class for the microprocessor card status.please see ICCReaderStatusStruct class for more information.
See also
ICCReaderStatusStruct
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_powerOffICC ( )
inline

Power down the currently selected microprocessor card in the ICC reader.

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_powerOnICC ( PowerOnStructure  options,
ResDataStruct  atrPPS 
)
inline

Power up the currently selected microprocessor card in the ICC reader. It follows the ISO7816-3 power up sequence and returns the ATR as its response.

Parameters
optionsthe options is optional.
please see PowerOnStructure class for more information.
See also
PowerOnStructure (not used for the UniPay II)
Parameters
atrPPSthe class for ATR string.
the ATR string is following:
  1. 2D01: Card Not Supported;
  2. 2D03: Card Not Supported, wants CRC;
  3. 690D: Command not supported on reader without ICC support;
  4. 8100: ICC error time out on power-up;
  5. 8200: invalid TS character received;
  6. 8500: PPS confirmation error;
  7. 8600: Unsupported F, D, or combination of F and D;
  8. 8700: protocol not supported EMV TD1 out of range;
  9. 8800: power not at proper level;
  10. 8900: ATR length too long;
  11. 8B01: EMV invalid TA1 byte value*;
  12. 8B02: EMV TB1 required*;
  13. 8B03: EMV Unsupported TB1 only 00 allowed*;
  14. 8B04: EMV Card Error, invalid BWI or CWI*;
  15. 8B06: EMV TB2 not allowed in ATR*;
  16. 8B07: EMV TC2 out of range*;
  17. 8B08: EMV TC2 out of range*;
  18. 8B09: per EMV96 TA3 must be > 0xF*;
  19. 8B10: ICC error on power-up;
  20. 8B11: EMV T=1 then TB3 required*;
  21. 8B12: Card Error, invalid BWI or CWI;
  22. 8B13: Card Error, invalid BWI or CWI;
  23. 8B17: EMV TC1/TB3 conflict*;
  24. 8B20: EMV TD2 out of range must be T=1*;
  25. 8C00: TCK error;
  26. A304: connector has no voltage setting;
  27. A305: ICC error on power-up invalid (SBLK(IFSD) exchange;
  28. E301: ICC error after session start
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_reviewAllSetting ( ICCSettingStruct  iccSetting)
inline

Review all setting of ICC status.

Parameters
iccSettingfor ICC setting. please see class ICCSettingStruct for more information.
See also
ICCSettingStruct
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_Set3VThen5V ( )
inline

Internal command Set ICC Voltage option, icc works on 3V then 5V

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_Set5V ( )
inline

Internal command Set ICC Voltage option, icc works only on 5V

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_setAsciiMask ( byte  maskWithAscii)
inline

Set ASCII Mask Data. This setting will be valid in the display of TAG 57/5A at the EMV Level 2 transaction processing.

Parameters
maskWithAscii,canbe from 0x20 to 0x7E, default is 0x2A(*)
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_setBCDMask ( byte  maskWithBCD)
inline

Set BCD Mask Data. This setting will be valid in the display of TAG 57/5A at the EMV Level 2 transaction processing.

Parameters
maskWithAscii,canbe from 0x0A to 0x0F, default is 0x0C(*)
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_setICCConnector ( byte  connector)
inline

Set the ICC or SAM connector.

Parameters
connector,thevalue to switch the ICC or SAM connector 0x00: use the ICC connector. 0x01: use the SAM connector.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.icc_setProAndPostPanLength ( int  prePanCtrlDataLen,
int  postPanCtrlDataLen 
)
inline

Set Pre/Post Pan Ctrl Data length. This setting will be valid in the display of TAG 57/5A at the EMV Level 2 transaction processing.

Parameters
prePanCtrlDataLen,thelength to show the pre PAN character with plaintext
postPanCtrlDataLen,thelength to show the post PAN character with plaintext
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.lcd_clearDisplay ( byte  control)
inline

LCD API LIST Clear Display.

Parameters
control,0first line, 1: second line, 0xFF: clear all screen
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.lcd_defaultSetting ( )
inline

Default LCD group setting.

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.lcd_displayMessage ( int  numLine,
String  message 
)
inline

Display message.

Parameters
numLine,theindex of line number, 0 or 1
messageDisplay line 2, up to 16 characters.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.lcd_displayPrompt ( int  numLine,
int  numPrompt 
)
inline

Display the prompt message.

Parameters
numLine,theindex of line number, 0 or 1
numPrompt,thenumber of prompt, from 0 to 9
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.lcd_enableSleepMode ( boolean  sleepMode)
inline

Enable the LCD to enter into sleep mode.

Parameters
sleepMode,true:setthe device to sleep mode; false:exit sleep mode.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.lcd_getSetting ( boolean[]  sleepMode)
inline

Review LCD Setting.

Parameters
sleepMode,sleepMode[0]means the sleep mode true: the LCD is on the sleep mode, the back light turned off
false: the LCD exist the sleep mode, the back light turned on
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.lcd_savePromptDisplay ( int  numPrompt,
String  message 
)
inline

Save prompt display message.

Parameters
numPrompt,thenumber of prompt, from 0 to 9
messageto Display, up to 16 characters.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.log_deleteLogs ( )
inline

delete the log in the root path of SD card.

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

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_Device.log_setVerboseLoggingEnable ( boolean  enableShowLog)
inline

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
int com.idtechproducts.device.IDT_Device.msr_cancelMSRSwipe ( )
inline

Disable MSR swipe card.

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.msr_defaultAllSetting ( )
inline

Default all setting of Mask and Encryption.

Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.msr_getSingleSetting ( byte  funcID,
byte[]  response 
)
inline

Get single setting of Mask and Encryption by Function ID.

Parameters
funcIDfunction ID.
0x49:Leading PAN digits to display(0x00~0x06).
0x4A:Last PAN digits to display(0x00~0x04).
0x4B:Mask ASCII code track data(0x20~0x7E).
0x4C:Encryption type ('1'-'2'). '1' 3DES, '2' AES.
0x50:Mask or display expiration date(0x30 or 0x31);0x31:don't mask expiration date.
0x7E:Security Level ID.
0x84:Encryption Option (Forced encryption or not)
Bit 0 : T1 force encrypt
Bit 1 : T2 force encrypt
Bit 2 : T3 force encrypt
Bit 3 : T3 force encrypt when card type is 0

0x86:Masked / clear data sending option Bit 0 : T1 mask allowed
Bit 1 : T2 mask allowed
Bit 2 : T3 mask allowed

NOTE:
UniPay support 0x49,0x50,0x4C,0x7E,0x84 and 0x86.
UniPay II support 0x49,0x50,0x4A, 0x4B, 0x4C,0x7E,0x84 and 0x86.

Parameters
responseresponse[0] for setting data.
Returns
success or error code.
See also
ErrorCode
boolean com.idtechproducts.device.IDT_Device.msr_isSwipeCardRunning ( )
inline

get the status if the swipe card task running.

Returns
true: swipe card task is running, false: swipe card task not running
int com.idtechproducts.device.IDT_Device.msr_reviewAllSetting ( MSRSettingStruct  msrSetting)
inline

Review all setting of Mask and Encryption.

Parameters
msrSettingfor MSR setting. please see class MSRSettingStruct for more information.
See also
MSRSettingStruct
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.msr_setSingleSetting ( byte  funcID,
byte  setData 
)
inline

Set single setting of Mask and Encryption by Function ID.

Parameters
funcIDfunction ID.
0x49:Leading PAN digits to display(0x00~0x06).
0x4A:Last PAN digits to display(0x00~0x04).
0x4B:Mask ASCII code track data(0x20~0x7E).
0x4C:Encryption type ('1'-'2'). '1' 3DES, '2' AES.
0x50:Mask or display expiration date(0x30 or 0x31);0x31:don't mask expiration date.
0x7E:Security Level ID.
0x84:Encryption Option (Forced encryption or not)
Bit 0 : T1 force encrypt
Bit 1 : T2 force encrypt
Bit 2 : T3 force encrypt
Bit 3 : T3 force encrypt when card type is 0

0x86:Masked / clear data sending option Bit 0 : T1 mask allowed
Bit 1 : T2 mask allowed
Bit 2 : T3 mask allowed

NOTE:
UniPay support 0x49,0x50,0x4C,0x7E,0x84 and 0x86.
UniPay II support 0x49,0x50,0x4A, 0x4B, 0x4C,0x7E,0x84 and 0x86.

Parameters
setDatafor setting data.
Returns
success or error code.
See also
ErrorCode
int com.idtechproducts.device.IDT_Device.msr_startMSRSwipe ( )
inline

Enable MSR swipe card. Returns encrypted MSR data or function key value by call back function.
The function swipeMSRData in interface OnReceiverListener will be called if swiping card data received.

See also
OnReceiverListener
Returns
success or error code.
See also
ErrorCode
String com.idtechproducts.device.IDT_Device.phone_getInfoManufacture ( )
inline

Get manufacture version.

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

Get phones's model number information.

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

General API:registerListen.

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

void com.idtechproducts.device.IDT_Device.release ( )
inline

release, make the SDK in the idle status.

void com.idtechproducts.device.IDT_Device.setEMVListener ( OnReceiverListener  callback)
inline

Allows the EMV library to receive notifications from the OnReceiverListener

boolean com.idtechproducts.device.IDT_Device.setWaitingExchangeAPDUResponseTimeout ( int  timeoutValue)
inline

set the timeout for waiting Response from the reader.
the timeout works on the waiting for Exchange APDU,

Parameters
timeoutValue: the seconds value to wait the response, valid from 5 seconds to 10 seconds,
Returns
true or false. true: the timoutValue is valid, false: the timeoutValue is invalid,
boolean com.idtechproducts.device.IDT_Device.setWaitingMSRResponseTimeout ( int  timeoutValue)
inline

set the timeout for waiting Response from the reader.
the timeout works on the waiting for swiping MSR.

Parameters
timeoutValue: the seconds value to wait the response, valid from 30 seconds to 35 seconds.
Returns
true or false. true: the timoutValue is valid, false: the timeoutValue is invalid,
boolean com.idtechproducts.device.IDT_Device.setWaitingPINResponseTimeout ( int  timeoutValue)
inline

set the timeout for waiting Response from the reader.
the timeout works on the waiting for getting the PIN/Numeric.

Parameters
timeoutValue: the seconds value to wait the response, valid from 30 seconds to 60 seconds,
Returns
true or false. true: the timoutValue is valid, false: the timeoutValue is invalid,
void com.idtechproducts.device.IDT_Device.stopWaitingTask ( )
inline

Stop the waiting task which wait the device response.

Returns
null
void com.idtechproducts.device.IDT_Device.unregisterListen ( )
inline

unregisterListen to disable the detect


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