Package com.abc.bluetoothTerminalfactory
Class BluetoothSmartCard
java.lang.Object
com.abc.bluetoothTerminalfactory.BluetoothSmartCard
The
BluetoothSmartCard
class is a class that is used to communicate with a Smart Card using AB Circle Bluetooth Terminals-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the copyright information.static BluetoothSmartCard
getInstance
(Context context) The getInstance() function is a static method that returns a singleton instance of the BluetoothSmartCard classThis function returns the AbCircleBluetoothTerminalManager object that is used to communicate with bluetooth terminals devicesstatic String
This function returns the version of the libraryvoid
onResume()
This method re-initializes bluetooth after activity resume from stopvoid
onStop()
This method disconnects bluetooth terminals when the activity stopsstatic CardTerminals
An alternative method (workaround) for obtaining CardTerminals directly bypass TerminalFactory, Provider implementation can be different on older versions of android.
-
Method Details
-
getInstance
The getInstance() function is a static method that returns a singleton instance of the BluetoothSmartCard class- Parameters:
context
- The context of the calling activity.- Returns:
- The BluetoothSmartCard object.
-
onStop
public void onStop()This method disconnects bluetooth terminals when the activity stopsExample: protected void onStop() { BluetoothSmartCard.getInstance(this).onStop(); super.onStop(); }
-
onResume
public void onResume()This method re-initializes bluetooth after activity resume from stopExample: protected void onResume() { BluetoothSmartCard.getInstance(this).onResume(); super.onResume(); }
-
terminals
An alternative method (workaround) for obtaining CardTerminals directly bypass TerminalFactory, Provider implementation can be different on older versions of android.Example: CardTerminals cardTerminals = BluetoothSmartCard.getInstance(this).terminals();
- Returns:
- JSR268 CardTerminals
-
getVersion
This function returns the version of the library- Returns:
- The version of the library.
-
getCopyright
Returns the copyright information.- Returns:
- The copyright statement.
-
getManager
This function returns the AbCircleBluetoothTerminalManager object that is used to communicate with bluetooth terminals devices- Returns:
- The AbCircleBluetoothTerminalManager object.
-