beautypg.com

Listenforevents, Sendcommandtodevice, Getsdkversion – MagTek Audio Reader for Android Devices User Manual

Page 25

background image

19

track data length value for the track that has the error will be set to zero and no valid track data
will be supplied.
-

public String getTrackDecodeStatus()


Parameters

Return Value

Track Decode Status. Consists of three 2-byte hex values representing the decode status

for tracks 1, 2, and 3 (respectively from left to right).
Values are:

00 = Track OK

01 = Track read Error

02 = Track is Blank

listenForEvents

Sets which events to listen for
-

public void listenForEvents(long lpEvents)


Parameters

lpEvents

event type to listen for:

MagTekSCRA.DEVICE_EVENT_DATA_CHANGE

MagTekSCRA.DEVICE_EVENT_DATA_ERROR

MagTekSCRA.DEVICE_EVENT_DATA_START

sendCommandToDevice

Sends command to device
-

public void sendCommandToDevice(String lpstrMessage, int iTimeout)


Parameters

lpstrMessage

message to send

iTimeout

timeout wait time

getSDKVersion

Retrieves SDK version
-

public String getSDKVersion()


Parameters

Return Value