UniPay SDK Guide for Android  0.02.011
API reference
 All Data Structures Functions Variables Pages
com.idtechproducts.device.OnReceiverListener Interface Reference
Inheritance diagram for com.idtechproducts.device.OnReceiverListener:
com.idtechproducts.emv.UniPayEMV

Data Structures

enum  EMV_RESULT_CODE_Types
 
enum  USER_GRANT_TYPE
 

Public Member Functions

void swipeMSRData (IDTMSRData card)
 
void deviceConnected ()
 
void deviceDisconnected ()
 
void plugStatusChange (DEVICE_INTERFACE_Types deviceInterface, boolean deviceInserted)
 
void timeout (String msgInfo)
 
void AutoConfigCompleted (StructConfigParameters profile)
 
void AutoConfigProgress (int progressValue)
 
void ICCNotifyInfo (byte[] dataNotify, String strMessage)
 
boolean getUserGrant (USER_GRANT_TYPE nType, String strMessage)
 
void LoadXMLConfigFileInfo (int index, String strMessage)
 
void msgToConnectDevice ()
 
void msgAudioVolumeAjustFailed (String strMessage)
 

Detailed Description

The interface includes the callback functions for card data, PIN data and EMV data. The android activity should implement this interface then implement callback functions.

Member Function Documentation

void com.idtechproducts.device.OnReceiverListener.AutoConfigCompleted ( StructConfigParameters  profile)

The auto config process finished, and succeeded to get one profile to connect the device.

void com.idtechproducts.device.OnReceiverListener.AutoConfigProgress ( int  progressValue)

The auto config process percent value.

void com.idtechproducts.device.OnReceiverListener.deviceConnected ( )

Fires when device connects.

void com.idtechproducts.device.OnReceiverListener.deviceDisconnected ( )

Fires when device disconnects.

boolean com.idtechproducts.device.OnReceiverListener.getUserGrant ( USER_GRANT_TYPE  nType,
String  strMessage 
)

Get the user grant to continue process ,

Parameters
nType
0: grantConnectDevice: get the grant to connect the device, post when the phone detect the phone jack plug in the device.
1: grantUpdateXML: get the grant to update the configuration XML file.
2: grantOverwriteXML:get the grant to overwrite current configuration XML file.
3: grantTryAutoConfig: get the grant to search the profile through Auto config mode.
4: grantReportToIdtech: get the grant to report to ID TECH supports.
strMessage,thegrant type message information.
void com.idtechproducts.device.OnReceiverListener.ICCNotifyInfo ( byte[]  dataNotify,
String  strMessage 
)

The ICC Card seated status notification,

Parameters
dataNotifythe response data.
strMessage,theICC notification message information.
void com.idtechproducts.device.OnReceiverListener.LoadXMLConfigFileInfo ( int  index,
String  strMessage 
)

Get the user grant to continue process ,

Parameters
index
1: "This phone model is not supported by the current SDK. Please contact supporter for assistance."; 2: "Wrong XML file name, please set the filename or enable the auto update."; 3: "The XML file does not exist and the auto update disabled."; 4: "Can't download the XML file. Please make sure the network is accessible.";
strMessage,themessage information when loading the XML file.
void com.idtechproducts.device.OnReceiverListener.msgAudioVolumeAjustFailed ( String  strMessage)

The message notify the application failed to adjust the audio volume.

Parameters
strMessage,themessage of description about the failure info when to adjust the audio volume.
void com.idtechproducts.device.OnReceiverListener.msgToConnectDevice ( )

The message notify the application to connect the device.

void com.idtechproducts.device.OnReceiverListener.plugStatusChange ( DEVICE_INTERFACE_Types  deviceInterface,
boolean  deviceInserted 
)

Notify the plug status of phone jack.

void com.idtechproducts.device.OnReceiverListener.swipeMSRData ( IDTMSRData  card)

Call back function,this function will be called automatically if Card decode has been completed after swiping card.

Parameters
cardthe MSR data.
Card data.It is encrypted data and format is following:
  1. Data Length low byte - 1 byte;<br/r>
  2. Data length high byte - 1 byte;<br/r>
  1. Card Encode Type - 1 byte.0x00/0x80-ISO/ABA format,0x01/0x81-AAMVA format,0x03/0x83-Other and 0x04/0x84-undecoded format.
  2. Track1~3 Status - 1 byte.Bit0,1,2:Track1~3 decode and Bit3,4,5:Track1~3 sampling.
  3. Track1 data length - 1 byte.This length is the plain card data's length.
  4. Track2 data length - 1 byte.
  5. Track3 data length - 1 byte.
  6. Clear/mask data sent status - 1 byte.
    Bit0:1–Track1 clear/mask status present,0–not present.
    Bit1:1–Track2 clear/mask status present,0–not present.
    Bit2:1–Track1 clear/mask status present,0–not present.
    Bit3~Bit7:Reserved.Set to 0.
    9.Encrypted/Hash data sent status - 1 byte.
    Bit0:1–Track1 encrypted data present.
    Bit1:1–Track2 encrypted data present.
    Bit2:1–Track3 encrypted data present.
    Bit3:1–Track1 hash data present.
    Bit4:1–Track2 hash data present.
    Bit5:1–Track3 hash data present.
    Bit0:0.
    Bit7:1–KSN present.
  7. Track1 clear/mask data – Var bytes.
  8. Track2 clear/mask data – Var bytes.
  9. Track3 clear/mask data – Var bytes.
  10. Track1 encrypted data – Var bytes.
  11. Track2 encrypted data – Var bytes.
  12. Track3 encrypted data – Var bytes.
  13. Track1 hash data – 20 bytes if exist.
  14. Track2 hash data – 20 bytes if exist.
  15. Track3 hash data – 20 bytes if exist.
  16. KSN – 10 bytes.
void com.idtechproducts.device.OnReceiverListener.timeout ( String  msgInfo)

Timeout when wait for the response.
This happens in the process of get PINpad, swipe MSR, EMV Level 2 transaction


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