![]() |
IDTech Android SDK Guide
1.00.133
API reference for SecureMag
|
Public Member Functions | |
IDT_SecureMag (OnReceiverListener callback, Context context) | |
boolean | device_setDeviceType (ReaderInfo.DEVICE_TYPE deviceType) |
void | setIDT_Device (FirmwareUpdateTool fwTool) |
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 () |
boolean | device_isConnected () |
int | device_startRKI () |
int | device_getFirmwareVersion (StringBuilder version) |
int | config_getSerialNumber (StringBuilder serialNumber) |
String | device_getResponseCodeString (int errorCode) |
int | device_sendDataCommand (String cmd, boolean calcLRC, String data, ResDataStruct respData, int timeout) |
int | device_sendDataCommand (String cmd, boolean calcLRC, String data, ResDataStruct respData) |
int | device_reviewAllSetting (ResDataStruct respData) |
int | device_enableTDES (ResDataStruct respData) |
int | device_enableAES (ResDataStruct respData) |
int | device_getKSN (ResDataStruct ksn) |
int | device_enableErrorNotification (ResDataStruct respData, boolean enable) |
int | device_enableExpDate (ResDataStruct respData, boolean enable) |
int | device_setEnhancedMode (ResDataStruct respData, boolean enable) |
int | device_switchToKeyboardMode (ResDataStruct respData) |
int | device_switchToHidMode (ResDataStruct respData) |
int | msr_defaultAllSetting () |
int | msr_cancelMSRSwipe () |
int | msr_startMSRSwipe () |
Static Public Member Functions | |
static IDT_Device | getSDKInstance () |
static void | useUSBIntentFilter () |
static IDT_Device | getIDT_Device () |
com.idtechproducts.device.IDT_SecureMag.IDT_SecureMag | ( | OnReceiverListener | callback, |
Context | context | ||
) |
It is the constructor of the main class IDT_BTMag. When it is called, the SDK will create the Instance for IDT_BTMag device. The interface OnReceiverListner needs to be implemented in the application.
callback | OnReceiverListener callback |
context | Application context |
String com.idtechproducts.device.IDT_SecureMag.config_getSDKVersion | ( | ) |
READER CONFIG API LIST Get the version of SDK.
sdkVersion | for version string. |
int com.idtechproducts.device.IDT_SecureMag.config_getSerialNumber | ( | StringBuilder | serialNumber | ) |
Get the serial number of device.
serialNumber | returns Serial Number string. |
String com.idtechproducts.device.IDT_SecureMag.config_getXMLVersionInfo | ( | ) |
Get XML configuration version.
int com.idtechproducts.device.IDT_SecureMag.device_enableAES | ( | ResDataStruct | respData | ) |
enable AES encryption.
respData | response data from reader |
int com.idtechproducts.device.IDT_SecureMag.device_enableErrorNotification | ( | ResDataStruct | respData, |
boolean | enable | ||
) |
To enable or disable MSR error notification.
respData | response data from reader |
enable | to enable or disable the notification |
int com.idtechproducts.device.IDT_SecureMag.device_enableExpDate | ( | ResDataStruct | respData, |
boolean | enable | ||
) |
To enable or disable Expiration date in MSR data
respData | response data from reader |
enable | to enable or disable expiration date |
int com.idtechproducts.device.IDT_SecureMag.device_enableTDES | ( | ResDataStruct | respData | ) |
enable TDES encryption.
respData | response data from reader |
DEVICE_TYPE com.idtechproducts.device.IDT_SecureMag.device_getDeviceType | ( | ) |
Gets type of device
int com.idtechproducts.device.IDT_SecureMag.device_getFirmwareVersion | ( | StringBuilder | version | ) |
start Auto Config to search the profile.
strXMLFilename | Input the customized XML file as the templates to search the profile. |
version | for version string. |
int com.idtechproducts.device.IDT_SecureMag.device_getKSN | ( | ResDataStruct | ksn | ) |
Get the Account DUKPT Key KSN of device.
10-byte | KSN |
String com.idtechproducts.device.IDT_SecureMag.device_getResponseCodeString | ( | int | errorCode | ) |
Get Response Code String
Interpret a response code and return string description.
errorCode | Error code, range 0x0000 - 0xFFFF, example 0x0300 |
boolean com.idtechproducts.device.IDT_SecureMag.device_isConnected | ( | ) |
set XML Configuration File Name with the full path.
xmlFilename,XML | Configuration File Name. |
xmlFilename,XML | Configuration File Name. |
profile,the | profile is the one which is the result from Auto config. |
int com.idtechproducts.device.IDT_SecureMag.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.
respData | Returns TLV in ResDataStruct.resData. Status Code in ResDataStruct.statusCode. |
int com.idtechproducts.device.IDT_SecureMag.device_sendDataCommand | ( | String | cmd, |
boolean | calcLRC, | ||
String | data, | ||
ResDataStruct | respData, | ||
int | timeout | ||
) |
Send a NSData object to device
Sends a command represented by the provide NSData object to the device through the accessory protocol.
cmd | NSData representation of command to execute |
calcLRC | If TRUE , this will wrap command with start/length/lrc/sum/end: '{STX}{Len_Low}{Len_High} data {CheckLRC} {CheckSUM} {ETX}' |
data | Command data (if applicable) for IDG, not used for NGA |
response | Returns response ResDataStruct.respData |
timeout | Command timeout in seconds |
int com.idtechproducts.device.IDT_SecureMag.device_sendDataCommand | ( | String | cmd, |
boolean | calcLRC, | ||
String | data, | ||
ResDataStruct | respData | ||
) |
Send a NSData object to device
Sends a command represented by the provide NSData object to the device through the accessory protocol.
cmd | NSData representation of command to execute |
calcLRC | If TRUE , this will wrap command with start/length/lrc/sum/end: '{STX}{Len_Low}{Len_High} data {CheckLRC} {CheckSUM} {ETX}' |
data | Command data (if applicable) for IDG, not used for NGA |
response | Returns response ResDataStruct.respData |
boolean com.idtechproducts.device.IDT_SecureMag.device_setDeviceType | ( | ReaderInfo.DEVICE_TYPE | deviceType | ) |
Defines connection Bluetooth
deviceType | DEVICE_TYPE.DEVICE_BTMAG |
int com.idtechproducts.device.IDT_SecureMag.device_setEnhancedMode | ( | ResDataStruct | respData, |
boolean | enable | ||
) |
To enable or disable Enhanced Encryption mode
respData | response data from reader |
enable | to enable or disable enhanced encryption mode |
int com.idtechproducts.device.IDT_SecureMag.device_startRKI | ( | ) |
Start remote key injection.
int com.idtechproducts.device.IDT_SecureMag.device_switchToHidMode | ( | ResDataStruct | respData | ) |
switch to HID-USB Mode.
respData | response data from reader |
int com.idtechproducts.device.IDT_SecureMag.device_switchToKeyboardMode | ( | ResDataStruct | respData | ) |
switch to Keyboard Mode.
respData | response data from reader |
|
static |
Returns an instance of the currently initialized IDT_Device class.
int com.idtechproducts.device.IDT_SecureMag.log_deleteLogs | ( | ) |
delete the log in the root path of SD card.
void com.idtechproducts.device.IDT_SecureMag.log_setSaveLogEnable | ( | boolean | enable | ) |
Enable/Disable save the log into the root path of SD card.
enableShowLog,true | enable save the log, the log includes the .txt text log and .wav signals file. false: disable save the log. |
void com.idtechproducts.device.IDT_SecureMag.log_setVerboseLoggingEnable | ( | boolean | enable | ) |
Enable/Disable Verbose Logging show in the logcat view window.
enableShowLog,true | enable to show the log in the logcat view window. false: disable to show the log in the logcat view window. |
int com.idtechproducts.device.IDT_SecureMag.msr_cancelMSRSwipe | ( | ) |
Get single setting of Mask and Encryption by Function ID.
funcID | function 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.
response | response[0] for setting data. |
funcID | function 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.
setData | for setting data. |
Cancels MSR swipe request.
int com.idtechproducts.device.IDT_SecureMag.msr_defaultAllSetting | ( | ) |
Default all setting of Mask and Encryption.
int com.idtechproducts.device.IDT_SecureMag.msr_startMSRSwipe | ( | ) |
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.
String com.idtechproducts.device.IDT_SecureMag.phone_getInfoManufacture | ( | ) |
Get manufacture version.
String com.idtechproducts.device.IDT_SecureMag.phone_getInfoModel | ( | ) |
Get phones's model number information.
void com.idtechproducts.device.IDT_SecureMag.registerListen | ( | ) |
General API:registerListen.
registerListen to enable SDK detect the phone jack plug in/off notification
void com.idtechproducts.device.IDT_SecureMag.release | ( | ) |
release, make the SDK in the idle status.
void com.idtechproducts.device.IDT_SecureMag.setIDT_Device | ( | FirmwareUpdateTool | fwTool | ) |
For System Use Only
fwTool | Parameter for firmware update |
void com.idtechproducts.device.IDT_SecureMag.unregisterListen | ( | ) |
unregisterListen to disable the detect
|
static |
Use USB Intent Filter For USB Devices, you may opt to incorporate an Intent Filter that will automatically start your application when a specific USB device is attached. The SDK must be informed to bypass it's normal Enumeration of USB Devices when an Intent Filter is being use. This function MUST be called BEFORE device_setDeviceType() is executed if a USB Intent Filter is being utilized. https://developer.android.com/guide/topics/connectivity/usb/host.html