question

4leaflabs avatar image
4leaflabs asked 4leaflabs commented

Notifications not getting delivered, but fixed with a device restart

We've had some cases recently where merchants were not getting notifications on their Clover Station. We checked the following..

  • Wifi connectivity
  • Whether orders were syncing with clover.com

After we had the merchant restart the device, the problem went away. Any thoughts on why this might be happening and how it can be prevented.

The impact is that merchants aren't getting notified about orders.

3 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.

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Can you clarify what you mean by "notifications"? Is it what is described here: https://docs.clover.com/build/android... or something else?

0 Likes 0 ·
4leaflabs avatar image 4leaflabs commented ·

Yes, that is what I meant by notification. We're using this REST API call https://www.clover.com/api_docs#!/not...

0 Likes 0 ·
Bejoy Nair avatar image Bejoy Nair commented ·

Has this issue been fixed. We are facing similar issue at client devices where the app noticiation is not getting delivered. It works most of the time but few notiifications are not getting delivered.

Here is the API that we are calling: POST /v3/apps/{aId}/merchants/{mId}/notifications

thx,

0 Likes 0 ·

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered 4leaflabs commented

Notifications are not reliable. They are delivered best effort only. There are many reasons why a notification may not have been received but the most likely reason is poor or intermittent network connectivity. It's hard for me to suggest an alternative design without understanding more about how your app works.

11 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.

Bejoy Nair avatar image Bejoy Nair commented ·

Jeff - We are trying to print an order that has been received by Clover using our online order app. There are 3 options:

  1. Clover Notification - Send a clover app notification informing for new order and have a service that will handle this clover notification and send it to printer.
  2. *ContentObserver * - Handle the observer event3 and send it to printer.
  3. NewOrderReceived Intent - We can listen this intent and send the order to printer.

Which option do you think is the most appropriate for guaranteed printing. In our experience all 3 options are unreliable!

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

It'd be better to come up w/ a solution that doesn't require your app to be running constantly in the background. Can you register for ACTION_ORDER_CREATED?

0 Likes 0 ·
Bejoy Nair avatar image Bejoy Nair commented ·

Thanks Jeff for the suggestion. ACTION_ORDER_CREATED - does this work on dev/sandbox devices. The first time we explored this intent it did not work on our dev tablets. hence we did not pursue this approach.

I agree with the approach of not having the app running in the background(using a service). But want to make sure this intent will be called everytime across all devices/environment.

Please advice.

thx,

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

If it doesn't work, that's a bug. I will file an internal issue to get it fixed. EDIT: AFAICT, it should be working. The broadcast should be "com.clover.intent.action.ORDER_CREATED" as defined by Intents.ACTION_ORDER_CREATED.

0 Likes 0 ·
Bejoy Nair avatar image Bejoy Nair commented ·

Thanks Jeff. Instead of using ACTIONORDERCREATED, we are thinking of using ACTIONMODIFYORDER. The reason being we have to look for payment before we can print an order. Since payment is a 2 step process:
1. Create Order
2. Apply Payment

we can use ACTIONMODIFYORDER to determine if the order has been created and paid. Else we will print an order that has not yet been paid.

On a side note: Is there a way to combine order + payment API into a single transaction. Currently they are 2 different calls..

thx, Bejoy

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community