Empty response from cloud messaging

Hello,

We are trying to do push notification by sending through cloud messaging. However, when we send the message (from php), we are getting an empty response and no message is sent.

In the snippet of a sample that is in documentation, it seems like when the message is sent successfully, a response is returned. We are not getting any errors but neither are we getting a response.

What more information could I provide to help resolve what we are doing wrong?

Regards,

Waqar

What’s the HTTP status code you are getting from the server?

HTTP Status code = 202.

Hmmm. I am getting the messages today.

202 Accepted is the expected response. If you run into an issue not receiving webhook notifications again, please let us know and provide Poynt-Request-Id header value from the HTTP response.

Hello everybody,
I know a lot of time has passed since the thread has been open but i’m experiencing the same issue.
When i send a cloud notifications i don’t get any errors and the response code is 200, but still no push notifications arrives at my testing device.
any suggestion?

thanks in advance,
Andrea.

After you send the notification and get 202 response, if the message is not received on the terminal can you double tap the clock on the launcher screen?

Hey dennis,
i’m currently receiving the notificaion on my app cause i read this everytime i send the notification from my node.js app:

02-11 02:56:11.461 1552-4757/co.poynt.cloudmessaging D//PcmWebSocketClient.java:64: ReadingThread WEBSOCKET got: {“deviceId”:“urn:tid:4f92fb19-5be6-3d98-8ec0-aa7001aa8fa0”,“serialNum”:“P6SW188JS001130”,“type”:“co.poynt.api.model.CloudMessage”,“body”:"{“recipient”:{“packageName”:“com.example.alex.livehelppoynt”,“className”:“MyBroadcastReceiver”},“ttl”:5000,“id”:“urn:tid:4f92fb19-5be6-3d98-8ec0-aa7001aa8fa0-111”,“data”:“bellissimo3”,“deviceId”:“urn:tid:4f92fb19-5be6-3d98-8ec0-aa7001aa8fa0”,“serialNum”:“P6SW188JS001130”,“sender”:“urn:aid:4d02cdb2-dcae-451b-b314-07e0a8ace1a8”,“businessId”:“435ba9ad-57bf-445f-87fa-a0c21df9499d”,“storeId”:“1f7b06ed-2325-4aaf-b4fe-3b5c03e1bc9d”}",“businessId”:“435ba9ad-57bf-445f-87fa-a0c21df9499d”,“storeId”:“1f7b06ed-2325-4aaf-b4fe-3b5c03e1bc9d”}

The problem is that my broadcast receiver is never triggered. Any idea why?

This is my code:






public class MyBroadcastReceiver extends BroadcastReceiver {
public MyBroadcastReceiver() { }
@Override
public void onReceive(Context context, Intent intent) {

    Log.d("MyBroadcastReceiver", "Got cloud Message: " + intent.getStringExtra(Intents
            .INTENT_EXTRA_CLOUD_MESSAGE_BODY));

}

}

poynt.sendCloudMessage({
businessId : ‘435ba9ad-57bf-445f-87fa-a0c21df9499d’,
storeId : ‘1f7b06ed-2325-4aaf-b4fe-3b5c03e1bc9d’,
deviceId : ‘urn:tid:4f92fb19-5be6-3d98-8ec0-aa7001aa8fa0’,
recipientClassName : ‘MyBroadcastReceiver’,
recipientPackageName : ‘com.example.alex.livehelppoynt’,
data : msg,
ttl : ‘5000’
}, function (err, doc, http) {
if (err) {
res.send(err);
console.log(err);
}

   var my_response = JSON.stringify(doc);
   console.log(my_response);
   res.send("Sent!");
});

Best regards,
Andrea

I think it’s the same issue as Nothing happens when sending push notifications?

1 Like