public interface Card
Through this interface, the connection or disconnection operation between the card and the card reader device can be realized, and the basic information such as ATR,ID and status of the card can be obtained.
Modifier and Type | Field and Description |
---|---|
static int |
PROTOCOL_RFCARD_TYPE_A
ISO14443 TYPE A.
|
static int |
PROTOCOL_RFCARD_TYPE_B
ISO14443 TYPE B.
|
static int |
PROTOCOL_T_0
The asynchronous half-duplex communication protocol of T=0
|
static int |
PROTOCOL_T_1
The asynchronous half-duplex communication protocol of T=1
|
static int |
PROTOCOL_UNKNOWN
UNKNOW protocol
|
static int |
STATUS_ABSENT
Card slot status:removed.
|
static int |
STATUS_CONNECTED
Card slot status:connected.
|
static int |
STATUS_DISCONNECTED
Card slot status:disconnected.
|
Modifier and Type | Method and Description |
---|---|
int |
getCardStatus()
Gets card status.
|
byte[] |
getID()
For contactless card, gets card ID, for contact card, gets the ATR of the card.
|
byte[] |
getIDInfo()
For contactless card, gets SAK(1 byte)+ATQA(2 bytes)+ID, for contact card, gets the ATR of the card.
|
int |
getProtocol()
Gets the constant value of the communication protocol between the card slot and the card.
|
static final int PROTOCOL_RFCARD_TYPE_A
static final int PROTOCOL_RFCARD_TYPE_B
static final int PROTOCOL_T_0
static final int PROTOCOL_T_1
static final int PROTOCOL_UNKNOWN
static final int STATUS_CONNECTED
static final int STATUS_DISCONNECTED
static final int STATUS_ABSENT
byte[] getID() throws DeviceException
DeviceException
byte[] getIDInfo() throws DeviceException
DeviceException
int getProtocol() throws DeviceException
The method is a synchronized method. When a card is in the card slot and the card slot is opened, the method will be called.
DeviceException
- for the standard reasons that are documented in
DeviceException
.int getCardStatus() throws DeviceException
DeviceException
- for the standard reasons that are documented in
DeviceException
.