public class SCardReaderListCallback
This abstract class is used to implement class SCardReaderList callbacks.
class SCardReaderList| Constructor and Description |
|---|
SCardReaderListCallback()
This abstract class is used to implement
class SCardReaderList callbacks. |
| Modifier and Type | Method and Description |
|---|---|
void |
onCardConnected(SCardChannel channel)
Used to give the result of a
SCardReader.cardConnect |
void |
onCardDisconnected(SCardChannel channel)
Used when the card is disconnected
|
void |
onControlResponse(SCardReaderList readerList,
byte[] response)
When a response is received after a call to
SCardReaderList.control |
void |
onPowerInfo(SCardReaderList readerList,
int powerState,
int batteryLevel)
Response to
SCardReaderList.getPowerInfo |
void |
onReaderListClosed(SCardReaderList readerList)
When a disconnection from the current connected readerList is asked or when the readerList itself close
|
void |
onReaderListCreated(SCardReaderList readerList)
When the SCardReaderList.create methods finished its job, this method is called
|
void |
onReaderListError(SCardReaderList readerList,
SCardError error)
Invoked for all readerList-level errors, e.g. BLE error, protocol error, etc. When this callback is invoked, the connection to the readerList is often closed.
|
void |
onReaderListState(SCardReaderList readerList,
boolean isInLowPowerMode)
Invoked when the device is going to sleep or waking up
|
void |
onReaderOrCardError(java.lang.Object readerOrCard,
SCardError error)
Invoked for all “recoverable” errors, e.g. invalid slot number, card absent, card removed or mute, etc.
|
void |
onReaderStatus(SCardReader slot,
boolean cardPresent,
boolean cardConnected)
When a card is inserted into, or removed from an active reader
|
void |
onTransmitResponse(SCardChannel channel,
byte[] response)
When a R-APDU is received after a call to
SCardChannel.transmit |
public SCardReaderListCallback()
This abstract class is used to implement class SCardReaderList callbacks.
class SCardReaderListpublic void onReaderListCreated(SCardReaderList readerList)
When the SCardReaderList.create methods finished its job, this method is called
readerList - the readerList instantiatedpublic void onReaderListClosed(SCardReaderList readerList)
When a disconnection from the current connected readerList is asked or when the readerList itself close
readerList - SCardReaderListpublic void onControlResponse(SCardReaderList readerList, byte[] response)
When a response is received after a call to SCardReaderList.control
readerList - SCardReaderListresponse - a byte array if everything went well (empty in case of problem)SCardReaderList.controlpublic void onReaderStatus(SCardReader slot, boolean cardPresent, boolean cardConnected)
When a card is inserted into, or removed from an active reader
slot - SCardReadercardPresent - Is the card present?cardConnected - Is the card connected?public void onCardConnected(SCardChannel channel)
Used to give the result of a SCardReader.cardConnect
channel - SCardChannelSCardReader.cardConnectpublic void onCardDisconnected(SCardChannel channel)
Used when the card is disconnected
channel - SCardChannelpublic void onTransmitResponse(SCardChannel channel, byte[] response)
When a R-APDU is received after a call to SCardChannel.transmit
channel - SCardChannelresponse - a byte array if everything went well (empty in case of problem)SCardChannel.transmitpublic void onPowerInfo(SCardReaderList readerList, int powerState, int batteryLevel)
Response to SCardReaderList.getPowerInfo
readerList - SCardReaderListpowerState - 0 : unknown, 1 : USB/5V power supply, 2 : on batterybatteryLevel - 0-100%SCardReaderList.getPowerInfopublic void onReaderListError(SCardReaderList readerList, SCardError error)
Invoked for all readerList-level errors, e.g. BLE error, protocol error, etc. When this callback is invoked, the connection to the readerList is often closed.
readerList - SCardReaderList (could be null if the ScardReaderList has not been created yet)error - SCardErrorpublic void onReaderOrCardError(java.lang.Object readerOrCard,
SCardError error)
Invoked for all “recoverable” errors, e.g. invalid slot number, card absent, card removed or mute, etc.
readerOrCard - Anyerror - SCardErrorpublic void onReaderListState(SCardReaderList readerList, boolean isInLowPowerMode)
Invoked when the device is going to sleep or waking up
readerList - SCardReaderListisInLowPowerMode - True = going to sleep, False = waking-up