public class SCardReaderList
This class representing a SpringCard device (with possibly more than one slot)
Modifier and Type | Class and Description |
---|---|
static class |
SCardReaderList.Companion |
Modifier and Type | Field and Description |
---|---|
static SCardReaderList.Companion |
Companion |
Modifier and Type | Method and Description |
---|---|
void |
close()
Disconnect from the device
callback when succeed :
SCardReaderListCallback.onReaderListClosed |
void |
control(byte[] command)
The control function gives you direct control on the reader (even when there’s no card in it).
Counterpart to PC/SC’s SCardControl
callback success:
SCardReaderListCallback.onControlResponse |
java.lang.String |
getFirmwareVersion()
Firmware version of the device, in the form “MM.mm-bb-gXXXXX”
|
int |
getFirmwareVersionBuild()
The build number (bb part of libraryVersion)
|
int |
getFirmwareVersionMajor()
The MM part of libraryVersion
|
int |
getFirmwareVersionMinor()
The mm part of libraryVersion
|
void |
getPowerInfo()
Get battery level and power state from the device.
callback:
SCardReaderListCallback.onPowerInfo |
java.lang.String |
getProductName()
Product name of the device
|
SCardReader |
getReader(int slotIndex)
Retrieve the SCardReader at the index specified.
If the index is wrong the callback
SCardReaderListCallback.onReaderListError
will be called |
SCardReader |
getReader(java.lang.String slotName)
Retrieve the SCardReader associated to the name
passed in parameter. If the name doesn't exist,
callback
SCardReaderListCallback.onReaderListError
will be called |
java.lang.String |
getSerialNumber()
Serial number of the device, expressed in hexadecimal
|
byte[] |
getSerialNumberRaw()
Serial number of the BLE device
|
int |
getSlotCount()
Number of slots
|
java.util.List<java.lang.String> |
getSlots()
Name of every slot
|
java.lang.String |
getVendorName()
Manufacturer name of the device
|
boolean |
isConnected()
True the device is connected to the phone
|
boolean |
isCorrectlyKnown()
True if the device has previously been correctly connected (and the library as not been unloaded or SCardReaderList.clearCache has not been called)
|
boolean |
isSleeping()
True if the device is gone to sleep
|
void |
setConnected$module(boolean p)
True the device is connected to the phone
|
void |
setCorrectlyKnown$module(boolean p)
True if the device has previously been correctly connected (and the library as not been unloaded or SCardReaderList.clearCache has not been called)
|
void |
setSleeping$module(boolean p)
True if the device is gone to sleep
|
void |
wakeUp()
Wake-up ScardReaderList,
SCardReaderListCallback.onReaderListState is called when the reader is exiting from sleep |
public static SCardReaderList.Companion Companion
public java.lang.String getVendorName()
Manufacturer name of the device
public java.lang.String getProductName()
Product name of the device
public java.lang.String getSerialNumber()
Serial number of the device, expressed in hexadecimal
public byte[] getSerialNumberRaw()
Serial number of the BLE device
public java.lang.String getFirmwareVersion()
Firmware version of the device, in the form “MM.mm-bb-gXXXXX”
public int getFirmwareVersionMajor()
The MM part of libraryVersion
public int getFirmwareVersionMinor()
The mm part of libraryVersion
public int getFirmwareVersionBuild()
The build number (bb part of libraryVersion)
public boolean isSleeping()
True if the device is gone to sleep
public void setSleeping$module(boolean p)
True if the device is gone to sleep
public boolean isConnected()
True the device is connected to the phone
public void setConnected$module(boolean p)
True the device is connected to the phone
public boolean isCorrectlyKnown()
True if the device has previously been correctly connected (and the library as not been unloaded or SCardReaderList.clearCache has not been called)
public void setCorrectlyKnown$module(boolean p)
True if the device has previously been correctly connected (and the library as not been unloaded or SCardReaderList.clearCache has not been called)
public void control(byte[] command)
The control function gives you direct control on the reader (even when there’s no card in it).
Counterpart to PC/SC’s SCardControl
callback success: SCardReaderListCallback.onControlResponse
command
- control APDU to send to the deviceSCardReaderListCallback.onControlResponse
public SCardReader getReader(int slotIndex)
Retrieve the SCardReader at the index specified.
If the index is wrong the callback SCardReaderListCallback.onReaderListError
will be called
slotIndex
- IntSCardReaderListCallback.onReaderListError
public SCardReader getReader(java.lang.String slotName)
Retrieve the SCardReader associated to the name
passed in parameter. If the name doesn't exist,
callback SCardReaderListCallback.onReaderListError
will be called
slotName
- name of the slotSCardReaderListCallback.onReaderListError
public java.util.List<java.lang.String> getSlots()
Name of every slot
public int getSlotCount()
Number of slots
public void close()
Disconnect from the device
callback when succeed : SCardReaderListCallback.onReaderListClosed
public void getPowerInfo()
Get battery level and power state from the device.
callback: SCardReaderListCallback.onPowerInfo
SCardReaderListCallback.onPowerInfo
public void wakeUp()
Wake-up ScardReaderList, SCardReaderListCallback.onReaderListState
is called when the reader is exiting from sleep