|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.accessltd.device.AccessHIDInterface
public class AccessHIDInterface
This class provides access to the OCR (Optical Character Recognition) reader.
In order to use the OCR reader, you should first obtain an instance of the
OCR class using #Interface(Activity)
, then register a
AccessOCRDataListener
using
setOnOCRRxDataListener(AccessOCRDataListener)
in order to receive
card or passport swipe events and a AccessDeviceStatus
using
#setDeviceStatusListener(AccessDeviceStatusListener)
Once done, you should remove the listener using removeOCRListeners()
and close the connection using #close()
.
Constructor Summary | |
---|---|
AccessHIDInterface(android.app.Activity myActivity)
Constructs a new instance of the AccessHIDInterface class. |
Method Summary | |
---|---|
protected void |
finalize()
|
boolean |
FindDevice()
This method check if a known device is connected |
boolean |
getOCRReadingEnabled()
|
void |
removeOCRListeners()
Unregister the AccessDeviceStatusListener and
AccessOCRDataListener . |
void |
ReStart()
Restarts OCR device and reconnect it. |
void |
run()
|
boolean |
send(byte[] DataToSend)
Send data to the OCR |
void |
setOcrDeviceStatusListener(AccessDeviceStatusListener newListener)
Register the AccessDeviceStatusListener . |
void |
setOCRReadingEnabled(boolean Enabled)
Open the OCR connection. |
void |
setOnOCRRxDataListener(AccessOCRDataListener newListener)
Register the AccessOCRDataListener . |
void |
Stop()
Stop device connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AccessHIDInterface(android.app.Activity myActivity)
AccessHIDInterface
class.
myActivity
- is an Activity
valueMethod Detail |
---|
public void Stop()
public void ReStart()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void setOnOCRRxDataListener(AccessOCRDataListener newListener)
AccessOCRDataListener
. This listener allow to get
data coming from OCR.
newListener
- is an AccessOCRDataListener
valuepublic void removeOCRListeners()
AccessDeviceStatusListener
and
AccessOCRDataListener
. This listener allowed to get data coming
from OCR.
public void setOcrDeviceStatusListener(AccessDeviceStatusListener newListener)
AccessDeviceStatusListener
. This listener allows to
get the OCR state (connected or disconnected)
an AccessDeviceStatusListener
value
public boolean FindDevice()
Boolean
valuepublic boolean send(byte[] DataToSend)
DataToSend
- a ByteBuffer
value
Boolean
valuepublic void setOCRReadingEnabled(boolean Enabled)
public boolean getOCRReadingEnabled()
public void run()
run
in interface java.lang.Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |