public final class Reader extends Object
The interfaces can be used to obtain the name of a secure element, check whether the secure element
is available, and enable a session on the secure element. The getReaders() method in
SEService can be used to obtain all available secure elements on a device.
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
TYPE_BASIC_CHANNEL |
Indicates a basic channel.
|
static int |
TYPE_LOGICAL_CHANNEL |
Indicates a logical channel.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
closeSessions() |
Disables all sessions on a secure element.
|
String |
getName() |
Obtains the name of a secure element.
|
boolean |
isSecureElementPresent() |
Checks whether a secure element is available.
|
Optional<Session> |
openSession() |
Enables a session on a secure element.
|
public static final int TYPE_BASIC_CHANNEL
This constant is used to specify the type of a channel to be enabled.
public static final int TYPE_LOGICAL_CHANNEL
This constant is used to specify the type of a channel to be enabled.
public String getName()
The name may be eSE or SIM.
public boolean isSecureElementPresent()
Before performing operations on a secure element, check whether it is available.
true if the secure element is available; returns false otherwise.public Optional<Session> openSession()
public void closeSessions()
Resources occupied by sessions are released when the sessions are disabled.