question

kalim avatar image
kalim asked Mark Mullan Deactivated answered

App Notifications not working properly

Hi,

Can anyone help me to send app notification properly. I am able to get success message as "{}" but not able to get any notification on my machine/device.

I am using below url to post notification: POST /v3/apps/{aId}/merchants/{mId}/notifications

10 |2000

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

Mark Mullan avatar image
Mark Mullan Deactivated answered

Hi Kalim,

In addition to making that REST API call, you'll need to use Clover's Android SDK to receive notifications on merchant devices that have your app installed and are listening for them. See an example here: https://github.com/clover/android-examples/tree/master/pushnotificationexample

Best,

Mark

10 |2000

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered

Just to explain a tad more, it sounds you expected to post the notification and have it shown in the Android notification bar. That's not how it works. Data sent to the /notifications endpoint is received on the device by Clover's services and exposed to apps via an Android broadcast. Your app needs to receive that broadcast and do what you will based on the event (and optional payload).

10 |2000

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