public class UsbSmartCard
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getCopyright()
It returns the copyright information.
|
TerminalFactory |
getFactory()
Returns the terminal factory that was used to create this terminal
|
static UsbSmartCard |
getInstance(Context context)
The getInstance() function is a static method that returns a singleton instance of the
UsbSmartCard class
|
UsbTerminalManager |
getManager()
This function returns the UsbTerminalManager object that is used to communicate with USB terminal
devices
|
static java.lang.String |
getVersion()
This function returns the version of the library
|
void |
onResume()
This method re-registers usb receivers and re-enumerates usb devices if connection is lost
|
void |
onStop()
This method un-registers usb receivers
|
static CardTerminals |
terminals()
An alternative method (workaround) for obtaining CardTerminals directly bypass TerminalFactory,
Provider implementation can be different on older versions of android.
|
public static UsbSmartCard getInstance(Context context)
context
- The context of the calling activity.public void onStop()
Example: protected void onStop() { UsbSmartCard.getInstance(this).onStop(); super.onStop(); }
public void onResume()
Example: protected void onResume() { UsbSmartCard.getInstance(this).onResume(); super.onResume(); }
public TerminalFactory getFactory()
Example: terminalFactory = UsbSmartCard.getInstance(this).getFactory();
public static CardTerminals terminals()
Example: CardTerminals cardTerminals = UsbSmartCard.getInstance(this).terminals();
public static java.lang.String getVersion()
public static java.lang.String getCopyright()
public UsbTerminalManager getManager()