As an example of integration, please use the sample app provided in our GitHub repository as a reference



Add the repository to your gradle dependencies:

allprojects {
    repositories {

Add the dependency to a module:

implementation 'com.mypos:slavesdk:2.1.3'



Initialize the MyPos components in your app:

public class SampleApplication extends Application {

private POSHandler  mPOSHandler;

public void onCreate() {
 	mPOSHandler = POSHandler.getInstance();

Optional settting for default receipt configuration is avaibale:


If set the default receipt configuration can be removed:


Optional setting for the language of the receipts is avaibale(default is Language.ENGLISH):


isTerminalBusy() returns boolean to check if an operation is being performed at the moment:



Connect to terminal

Choose connection type:


If the connection type is set to BLUETOOTH, ensure that the needed permissions are given in order to discover available Bluetooth devices.

if (POSHandler.getInstance().checkPermissions(context)) {
    // continue...
} else {
    // permissions request is sent...


Handle permissions result:

public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
   if (requestCode == POSHandler.PERMISSIONS_REQUEST_CODE) {
       // check permissions result...


Attach connection listener

mPOSHandler.setConnectionListener(new ConnectionListener() {
    public void onConnected(final BluetoothDevice device) {
        // handle connected event here



Attach pos ready listener

mPOSHandler.setPOSReadyListener(new POSReadyListener() {
    public void onPOSReady() {
        // now you can start a transaction


Send E-Receipt

In case you want to use email/phone receipt you have to choose POSHandler.RECEIPT_E_RECEIPT receipt configuration.

The following listener will be fired immediately after a transaction is approved:

POSHandler.getInstance().setPOSCredentialsListener(new POSCredentialsListener() {
    public void askForCredentials(final CredentialsListener listener) {
	listener.onCredentialsSet(""); // instead of email you can pass a phone number