Push Notification is not working properly

As in my app when I send push notifications through firebase it works perfectly, but when I send push notifications through backendless sometimes it works but most of the time it won’t work. and every day I need to send my first push notification by firebase then backendless push notification start working, and after that, if I did not send a push notification for a while again it stop working, and I need to send notification through firebase again.

Hi, @Ayaz_Khan

How exactly do you send a push notification in Backendless via the API or the console? What do you mean by “most of the time it doesn’t work”? Do you see any errors, if so, please provide them to us? If not, how do you understand what exactly is not working? Also, have you checked the status of the notifications sent? If not, please do so, you can see how to do this in the documentation below.
What do you see in the message status? Are there any errors?

https://backendless.com/docs/rest/push_get_message_status_2.html

Regards,
Marina

Hi @Marina.Kan
Thanks for your reply,

when I’m sending a push notification via API Or via console I got no error in this. But in my device some time I received Notifications sometimes Not. But when I send Notification via firebase, every time I received a notification on my device.
I get this response when I send a notification via API call
{
“errorMessage”: null,
“messageId”: “message:1172BB3A-EDBD-42B0-8914-5B4805691F9D”,
“status”: “scheduled”
}

Hi, @Ayaz_Khan

You need to take the messageId from the response, and check it for errors. Push notification delivery status is not available right away. To retrieve the status, you need to make a separate API call documented above in the previous message. Also, please note that the messageId is valid only for some time.

Regards,
Marina

Hi, @Marina.Kan

Here i got a response in which i didn’t find any error but we didn’t get any notification on device.
response


{
“errorMessage”: null,
“messageId”: “message:AA29B561-53EB-44D9-8207-81A949190142”,
“status”: “published”
}

@Ayaz_Khan

Try sending a message through the console. When you send it, you will see the number of devices to which the notification should be delivered. You can see this list in the DeviceRegistrations table. Is this device among those to which the notification should be delivered?
Check the Android certificate to make sure that it works and that the device is registered with this certificate. In addition, this certificate must be selected to send notifications to the channel where the device is registered.
How many devices should the notification be delivered to?

Regards,
Marina

Hi , @Marina.Kan
What is actually happening in the use case of Backendless push notification we are not able to send push notification through Backendless we think package and library should be updated
We have followed all procedure as per Backendless Pushnotification document but still no notification received in mobile side.
We are not receiving any notification while sending push notification from backendless
Could you provide latest document and all process step by step .We will configure in App side.
Thanks

Hello, @Ayaz_Khan.

So that we can help you, we need to get answers to our questions that were asked in the thread above.

Have you tried sending push notifications using the console?
If this happens only for one device, you need to check if notifications are blocked for it.
You should also check if the token and device ID are valid in the application.

Also check out our documentation:
https://backendless.com/docs/android/push_overview.html

Best Regards, Nikita.

Hello @Nikita ,
We have used the console but still it is not working and when we use “fcm test” for notification we are getting notification but in case of Backendless notification is not getting so you have to resolve this issue we are facing issue for long time could you provide solid solution for this issue.
We will follow the given document, hope it should work perfectly.
Thanks

Hi ,@Nikita
For React native , We are using React Native Platform for mobile application so need to install sdk of Backendless , We means how many packages will install in mobile side could you describe it .
We have installed npm backendless in our mobile side.
npm i backendless
Thanks

Do you use a real device or emulator to receive push notifications?

Hi ,@Nikita
We are using real devices.

Hello @Ayaz_Khan

Perhaps it has something to do with your FireBase account.
Also, try to re-register your device in the application.

It is difficult to understand what is the matter since the problem occurs only with you.

Regards,
Viktor

Hello @Ayaz_Khan

Please provide your applicationId.
Also, please provide a minimal project that reproduces the problem (Share secret data with Backendless team).

Hello @Volodymyr_Ialovyi
Secret key : AAAAy6a8HNE:APA91bGPFITS_wPkTnTGWlY-5MKyF7QIUN8OL1MWDbOG933y_SoHp5LLLzrBHBAgDIavkAMqf0SaqnQDJWC5QUrBcpLe0wOkHGB8057vV8ocQh2ktD6EcPFj8YWSdEvUFv0gshIVc8sT

Application id :820FBB35-552C-F405-FFB9-B4D60982E100

Hello @Ayaz_Khan

Unfortunately, I was unable to reproduce your problem.

We will be happy to assist you. I need to ask you a few more questions so I can understand the problem better.

Is operatingSystemVersion = 1.0 in your real devices?
Did you make the setup according to this documentation - Push Notification Setup (Android)?
Is your Android application downloaded from the code generation section (Console-> Code Generation-> Category: Android-> Push notifications)?
What does your AndroidManifest.xml file look like?
What does the code that should receive the notification look like?
When you send a push notification from the console, do you press SEND NOW button (Push from Console)?
What is your template for sending a notification when you do not receive a notification?

Could you provide a minimal project in which the problem is reproduced (your project in which there is only device registration and receiving push notifications)? This could greatly speed up the identification and resolution of your question (Share secret data with Backendless team ).

Hello @Ayaz_Khan

Are your beforePublish and afterPublish EVENT HANDLERS working? Are they logging?

Regards,
Vladimir

Hello @Volodymyr_Ialovyi
Already ,We have completed all steps which have provided by you but still not fixed. could you provide best solution.
Thanks

Hello @Ayaz_Khan

You have issues with devices registrations. I have opened message page Backendless and send notification.
Then I take message id and get message status with the following request:

curl --location --request GET 'https://api.backendless.com/820FBB35-552C-F405-FFB9-B4D60982E100/70C60178-218F-44D2-ABE9-276250E6DDBF/messaging/message:04CECD4C-A752-44D7-84CF-6AE9F2A290E7'

Response:

{
    "errorMessage": "[ deviceId: \"null\", message: \"Invalid device token.\"]\n[ deviceId: \"null\", message: \"InvalidRegistration\"]\n",
    "messageId": "message:04CECD4C-A752-44D7-84CF-6AE9F2A290E7",
    "status": "failed"
}

So make sure that you have correct registrations.