com.sewoo.request.android
Class AndroidMSR

java.lang.Object
  extended by com.sewoo.request.android.AndroidMSR

public class AndroidMSR
extends java.lang.Object

MSR card module for Android OS.

Since:
1.051

Method Summary
 void cancelMSR()
          Cancel the MSR mode.
 android.os.Handler getHandler()
          Get the Handler instance.
static AndroidMSR getInstance()
          Retrieve the instance of AndroidMSR.
 boolean isMSRStatus()
          Get the printer mode that either MSR mode or Normal mode.
 int readMSR(int mode)
          Reads the MSR data.
 void releaseInstance()
          Release the instance of AndroidMSR.
 void setHandler(android.os.Handler handler)
          Set the Handler instance to use in this class.
 void startReader()
          Starts the task that reads MSR status and data.
 void stopReader()
          Terminate MSRReaderTask.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AndroidMSR getInstance()
Retrieve the instance of AndroidMSR.

Returns:
AndroidMSR

releaseInstance

public void releaseInstance()
                     throws java.lang.InterruptedException
Release the instance of AndroidMSR.

Throws:
java.lang.InterruptedException

startReader

public void startReader()
                 throws java.lang.InterruptedException
Starts the task that reads MSR status and data.

Throws:
java.lang.InterruptedException

stopReader

public void stopReader()
                throws java.lang.InterruptedException
Terminate MSRReaderTask.

Throws:
java.lang.InterruptedException

isMSRStatus

public boolean isMSRStatus()
                    throws java.lang.InterruptedException
Get the printer mode that either MSR mode or Normal mode.

Returns:
msrStatus - MSR mode(true), Normal mode(false).
Throws:
java.lang.InterruptedException
java.io.IOException

readMSR

public int readMSR(int mode)
            throws java.lang.InterruptedException,
                   java.io.IOException
Reads the MSR data.

Parameters:
mode - - MSR Track 0x31,0x32,0x33,0x34, 0x35
Returns:
MSR_READ, NORMAL
Throws:
java.lang.InterruptedException
java.io.IOException

cancelMSR

public void cancelMSR()

Cancel the MSR mode.

Only use for exit MSR mode when waiting swipe card.


setHandler

public void setHandler(android.os.Handler handler)
Set the Handler instance to use in this class.

Parameters:
handler -

getHandler

public android.os.Handler getHandler()
Get the Handler instance.

Returns:
handler