hiteshr avatar image
hiteshr asked hiteshr answered

Unable to print order receipts properly - random behaviour


We're facing some very random behaviour with regards to notifications. We're trying to achieve the following:

- Receive an order on our external system

- Place an order via APIs

- Create a notification for the android app on the Clover machine

- Receive the notification using AppNotificationReceiver

- Fire a print using an intent service

We have a small android application in place which follows the push notification example from github. Till a while ago, everything was working fine, we were getting the notifications and orders were getting printed. But now, something has gone wrong. I test the code at 2 places, at my emulator and devkit(mini 2) both.

Devkit - When I try and fire a print using the devkit, nothing happens, absolutely nothing. No notifications received.

Emulator - When I sideload the app in emulator, I get the notification, although I get permission issue at times, and at times, there's no issue at all and I get all the logs correctly, which means if it were a devkit order printing would've worked fine. I get notifications always at least on the emulator.

Here is a logcat for both, the emulator and the devkit -

FYI - This is all in sandbox env.

Can you please tell us how to debug this? What are the steps to follow here?

10 |2000

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

David Marginian avatar image David Marginian ♦♦ commented ·

That doesn't look like a complete logcat, can you run "adb logcat|grep -i push" and include the output?

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

Hi David,

Thanks for the response. I've uploaded the output of "adb logcat|grep -i push" for the relevant time period in the same gist. You can view it at

This is for the devkit

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

Are you sure the device has a good internet connection?

0 Likes 0 ·
Show more comments

1 Answer

hiteshr avatar image
hiteshr answered

Hi David, Jeff and Clover team,

We were able to resolve this by resetting the device and logging in and opening the app once. The notifications came in and printing started. After resetting the printing didn't work unless we logged in and opened up the app once. By logging in, I mean entering the employee pin.

Is this expected behaviour? Please let us know!

10 |2000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community