Any changes in messaging?

Hello I’m trying to send push from my android app. For few days now, push aren’t sent. Before it was working. I receive this error for this call:

(https://myapp/api/messaging/message:43B0CAA9-FE30-4E80-ADF3-B0CABFCCB68F)

{
  "sendingTimeInMillis": 237,
  "failedSendsAmount": 1,
  "errorMessage": "[ deviceId: \"null\", message: \"DeprecatedApi\"]\n",
  "messageId": "message:43B0CAA9-FE30-4E80-ADF3-B0CABFCCB68F",
  "successfulSendsAmount": 0,
  "status": "failed"
}

Does the api is deprecated or any changes with this?

Thanks you

Hello @Indevers

We haven’t released any changes in the last few days. Could you provide what method you use and the version of the Android device for which the error occurs?

Regards, Dima

I’m using the REST API, this is my request body

For this call: https://myapp/api/messaging/orderStatusProvider

{
  "message": "Bravo Balou, le client pour l'événement Barbecue a validé votre prestation. Commencez à vous préparer pour lui assurer un événement de qualité",
  "publisherId": null,
  "headers": {
    "android-ticker-text": "ORDER_CHANNEL",
    "android-content-title": "false",
    "android-content-text": "12,44,60"
  },
  "publishPolicy": "PUSH",
  "pushBroadcast": "ANDROID",
  "pushSinglecast": [
    "D14C29F2-FC9F-4734-A834-3E4109BA09A6",
    "7074c534426a26a4",
    "348f0092257bc3f6",
    "7924da3cda9cfe76",
    "703b96dc9399546a",
    "7924da3cda9cfe76",
    "7924da3cda9cfe76",
    "c38f11d9e5fe3956",
    "7074c534426a26a4",
    "D14C29F2-FC9F-4734-A834-3E4109BA09A6"
  ],
  "publishAt": null
}

I have this response

{
  "errorMessage": null,
  "messageId": "message:848179F6-8E15-43A6-A4F5-967B11F5CBFF",
  "status": "scheduled"
}

And when I do this

https://myapp/api/messaging/message:7D397CCA-7C47-4D14-8D66-86C9052A2885

First time I have this response

{
  "sendingTimeInMillis": null,
  "failedSendsAmount": null,
  "errorMessage": "Could not find status for message with id: message:7D397CCA-7C47-4D14-8D66-86C9052A2885",
  "messageId": "message:7D397CCA-7C47-4D14-8D66-86C9052A2885",
  "successfulSendsAmount": null,
  "status": "unknown"
}

And second time I have this

{
  "sendingTimeInMillis": 447,
  "failedSendsAmount": 1,
  "errorMessage": "[ deviceId: \"null\", message: \"DeprecatedApi\"]\n",
  "messageId": "message:7D397CCA-7C47-4D14-8D66-86C9052A2885",
  "successfulSendsAmount": 0,
  "status": "failed"
}

My Android device is an Android 14.

Could you help me please ?

Hello, @Indevers.

Can you try to send push from template:
https://backendless.com/docs/rest/push_example_notification_from_a_push_template.html

Regards, Nikita.

@Nikita_Fedorishchev I’m trying to send push, but not from a template

Default API of sending push is not best solution for android. We recommend to try push notifications from template.

Is it possible to target specific devices with this method?
I need to send a push that will be detected in my device and according to the data I send, I can show a local notification with the good data. Is this method is dedicated for this? I read the documentation but I didn’t understand very well if it will send a real push or a push that I can caught to manage it.

Yes. For example:


Regards, Nikita.

Ok, so I done this:

And in the WHO

I try to test the push with postman like:

But I didn’t receive anything. Does I have miss something?

Hello @Indevers

You use legacy Secret Keys for android settings

Try to add new Service Account Private Keys:

Instructions for Push Notification Setup (Android)

Regards,
Volodymyr

Hello, Ok I changed with the new way.
I add my service account private key. But I didn’t receive anymore. There is a way to check the status? is the get message status api call is always working? Or a log in the backendless console?

Thanks you

Hello @Indevers

Your applicationId is 6BBA55A8-087F-EBA2-FF1B-596EB5335600?

Did you follow all the steps in the documentation about Push Notification Setup (Android)?

Get Message Status

Regards,
Volodymyr

ok sorry it’s working, I was needed to reset all deviceRegistration and now I receive the push. Thanks you

Thank you for contacting us. Please let us know if you run into any other issues, we’re here to make sure you have a fantastic experience with Backendless.

Regards,
Volodymyr

1 Like