Our app is a webview retail system written in Javascript, Html and CSS. It interacts with the SDK via calls to the Android "shell" app.
We have had a stable release for a few years now, but recent modifications and enhancements to the Java app to accomordate new features, new Clover devices and new versions of the Clover SDK have resulted in a number of problems. One of the modifications we have made to our app is to pass the basket items to the Java APK to display on the forward facing device, this has created a number of issues, please see these below.
Here are our outstanding issues ..
- A payment is taken by using Intents.ACTION_CLOVER_PAY and we receive the OrderId TransactionType (card or cash) and if it is a refund or a sale. In order to get more information, an OrderConnector is executed and payments related to that orderID are filtered and from the one that matches all the info we need is extracted:
* TenderID
* Amount
* CashTendered
* PaymentId
What happens if a split payment is done? Because an intent that is called with an ActivityResultContracts is only gets fired when the first payment is detected. - A refund is also taken using the same intent and returns the same Extras as part of the intent in the ActivityResultContracts, so how can I extract information like the one described above? Is it the same way?
- With regard to trying to use the forward facing display to show the basket contents. The CFP SDK documentation is not clear on how I can achieve seamlessly integration in the Station PRO and Station with a tethered MINI (v1 and v2). I managed to get the Station PRO working, but when I tried to do this:
executor.execute(() -> { remoteDeviceConnector.sendMessageToActivity(new MessageToActivity(CUSTOMER_ACTIVITY_NAME,"FINISH")); });
several times after each item is scanned, it blocks the MINI in the Station PRO, therefore any calls to remoteDeviceConnector.disconnect(); are ignored (or it doesn't release the MINI in order to take the payment or the refund). What should be the correct way to:
1 – Request the screen if it is not being used
2 – Send a first payload when the first item is scanned.
3 – Send a message to the activity using the function provided in the RemoteDevice SDK as many times as needed (taking into account that it needs a pool to execute those task, so it may display items in a different order but at the end the result will be the same)
4 – Release the MINI when a payment/refund is at the next step - Things related to the lifecycle of the CFP:
What happens if the user by mistake or some other reason, minimises the app in the POS? What should be the course of action here? - Finally, the BarcodeScanner. Our javascript app uses a handheld or built in barcode scanner. The output from these devices is a character string, which is akin to keyboard input. Is it possible to listen from the Android Java app instead, effectively intercepting the input from the scanning device ? Importantly please note that the javascript app will have focus,
Is this code part of an example?
private class BarcodeReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(BARCODE_BROADCAST)) { String barcode = intent.getStringExtra("Barcode"); if (barcode != null) { scannedBarcode = barcode; displayBarcode(); } } } }
Thanks in advance for your help.
Robin Walmsley