question

coder12 avatar image
coder12 asked David Marginian Deactivated edited

Clover android sdk Fire order not working

I am trying to fire a an order when I receive a notification event and am using the service code provided here. I got it working but I am trying to trigger a fire() event to print receipts on order printers. Currently it opens the printer selection popup for the order on the clover mini. The issue is instead of showing the print option on the clover device, I want to do a OrderConnector.fire() event to print the order on the kitchen printers but the OrderConnector.fire(orderID); does not send the print request to kitchen printers.


from the code here I have tried removing

 new StaticOrderPrintJob.Builder().order(newOrder).build().print(getApplicationContext(), account);

and replacing it with the fire command below:

try {
    orderConnector.fire(newOrder.getId());
} catch (RemoteException e) {
    e.printStackTrace();
} catch (ClientException e) {
    e.printStackTrace();
} catch (ServiceException e) {
    e.printStackTrace();
} catch (BindingException e) {
    e.printStackTrace();
}

but it does not fire the order. the order ID is also correct. when I debug and evaluate the above fire command I get a response of true.

OrdersClover MiniPrint
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

I would start by looking at Dan's answer here - https://community.clover.com/questions/754/urgentprintingclover-sdkfire-function-not-working.html. He lists several reasons why fire won't work.

18 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

coder12 avatar image coder12 commented ·

Hi, thanks for the reply. I checked all those and they seem to be setup correctly. The order does fire when tapping fire in the clover dining app however not directly in android app when triggered fire. The order id is valid. How can I check if the line items are already marked as printed? I create the order from a web app and don’t mark the line items printed as the web app cannot trigger print.

0 Likes 0 ·
coder12 avatar image coder12 coder12 commented ·

Also cloverconnectore.refire(orderId) also doesn’t work and is not found.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ coder12 commented ·

cloverconnectore.refire? What is that? So you create the orders via REST and then you send a notification to the app? Are you sure that you haven't changed permissions on your app (added order write) AFTER you installed the app on the device? Are you sure that the order has synced to the device with all line items before you call fire (there are some complexities here you need to be aware of and handle - https://community.clover.com/questions/24117/some-times-all-line-items-not-getting-from-order-u.html)? Are you absolutely certain that you set up the order printer and labels correctly?

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community