public class UnitermServiceHelper
extends Fragment
Example of how to use persistently from within an Activity:
FragmentManager fm = getFragmentManager();
UnitermServiceHelper mUnitermServiceHelper = (UnitermServiceHelper) fm.findFragmentByTag("ush_f1");
if (mUnitermServiceHelper == null) {
mUnitermServiceHelper = new UnitermServiceHelper();
fm.beginTransaction().add(mUnitermServiceHelper, "ush_f1").commit();
fm.executePendingTransactions();
}
This allows the fragment and its data to be retained after a configuration change.
Note: Only one txnrequest can run at a time. To run multiple transaction requests use multiple helper objects.
Modifier and Type | Class and Description |
---|---|
static interface |
UnitermServiceHelper.UnitermServiceHelperCallbacks
Callbacks for the available operations.
|
Constructor and Description |
---|
UnitermServiceHelper() |
Modifier and Type | Method and Description |
---|---|
void |
DoBluetoothlist()
Get a list of configured bluetooth devices.
|
void |
DoDeviceload(java.util.HashMap<java.lang.String,java.lang.String> kvs,
boolean force)
Load the device.
|
void |
DoDevicetypes()
Get a list of supported device types.
|
void |
DoPassthrough(java.util.HashMap<java.lang.String,java.lang.String> kvs)
Run a passthrough transaction to Monetra.
|
void |
DoRawKVS(java.util.HashMap<java.lang.String,java.lang.String> kvs,
boolean autoStatus)
Send kvs to Uniterm.
|
void |
DoTxnFinish(java.util.HashMap<java.lang.String,java.lang.String> kvs,
boolean autoStatus) |
void |
DoTxnrequest(java.util.HashMap<java.lang.String,java.lang.String> kvs,
boolean autoStatus)
Run a transaction request.
|
void |
DoTxnrequestCancel()
Cancel the currently running txnrequest.
|
void |
DoTxnrequestStatus()
Get the status for the currently running txnrequest.
|
void |
DoTxnstart(java.util.HashMap<java.lang.String,java.lang.String> kvs,
boolean autoStatus) |
void |
DoVersion()
Get the version of Uniterm.
|
boolean |
IsTxnrequestRunning()
Is a txnrequest currently running.
|
void |
onAttach(Activity activity) |
void |
onCreate(Bundle savedInstanceState) |
void |
onDetach() |
public void onCreate(Bundle savedInstanceState)
public void onAttach(Activity activity)
public void onDetach()
public boolean IsTxnrequestRunning()
public void DoTxnrequest(java.util.HashMap<java.lang.String,java.lang.String> kvs, boolean autoStatus)
KVS should have at a minimum:
kvs
- Key value pairs.autoStatus
- Should status be run for the duration of the txn automatically?public void DoTxnstart(java.util.HashMap<java.lang.String,java.lang.String> kvs, boolean autoStatus)
public void DoTxnFinish(java.util.HashMap<java.lang.String,java.lang.String> kvs, boolean autoStatus)
public void DoTxnrequestStatus()
public void DoTxnrequestCancel()
public void DoDeviceload(java.util.HashMap<java.lang.String,java.lang.String> kvs, boolean force)
KVS should have at a minimum:
kvs
- Key value pairs.force
- Force loading the device.public void DoPassthrough(java.util.HashMap<java.lang.String,java.lang.String> kvs)
kvs
- Key value pairs.public void DoVersion()
public void DoBluetoothlist()
This is all bluetooth devices not only payment devices.
public void DoDevicetypes()
public void DoRawKVS(java.util.HashMap<java.lang.String,java.lang.String> kvs, boolean autoStatus)
This can be used to send commands that do not have a convenience function here. This should only be used to fill gaps in this interface not as the sole means of communicating with Uniterm. If the rest of the helper functions are not used it is recommended to integrate with Uniterm directly though the aidl interface.
kvs
-