Push notification


I am planning to use Backendless (backend) to push notification to both Android and IOS devices. I have followed the steps provided in the following link but still unable to receive any notification.

After talking to the support from Backendless and running a test to see the status of the push notification, I am receiving this error message which seems to indicate that the device token is bad/invalid.

May I know if I missed any steps?

Edit: After talking to the support from Backendless, seems that I need to get the deviceId from my device. May I know how do I retrieve the deviceId from my device? I’ve tried searching for it in the system variables but could not find anything

There is a ‘Get Device Token’ flow function in the market place you should be using.

If you refer to the screenshot above, I’ve already managed to retrieve the device token. However, I am now stuck at retrieving the deviceID as Backendless seems to require that parameter to push notification.

I’ve never heard of needing a “Device ID”, whatever that is, for Push Notifications. The Device Token itself is all that should be required as it is actually a Device + App ID combination to create a unique device address to send messages to. Im not very familiar with Backendless but are you sure that the “Device ID:” Backendless expects isn’t actually the Device Token? ie - have you tried passing the Device Token you get from Appgyver into the Device ID field of your Backendless API?

I just tried to pass the Device Token from Appgyver into the Device ID field of the API and the API failed. The API failed because the Device Token value exceed the field max string of the Device ID.

On the other hand, I am exploring the use of Firebase’s notification composer to push notification and came across the tutorial you wrote in this post (Push Notification Tutorial - #3 by JOHN_WORSHAM).

I’ve tried to push a notification and managed to push the notification to my android device, however I have a few enquiries regarding the use of firebase.

  1. As you can see in the screenshot above, my logic flow did not have anything to do with firebase, but firebase managed to push the notification to my device. How did firebase know which device to send the notification to? Or did it push the notification to all the device that had previously retrieve the token before?
  2. May I know how can I subscribe/unsubscribe from FCM?

Thank you

Regarding Backendless, if the deviceToken is the Device + App ID, have you tried using the substring function to remove the App ID values to just get the Device ID?

I’m also using Backendless to setup Notifications, so I’m very interested in helping solve this.



To use the substring function to remove the App ID values from the token, I’ll have to know what is the format the deviceID that Backendless requires first.

IOS device token I got from “Get device Token”: 7cf7ea914b967304376016f7a5485e0cfb3a7965a2c71081b744095961d21*** (replaced the last 3 letters with * instead)

If the device token is Device + App ID, I have no idea which portion is which to even start removing.

I’ve found another post, [ Tutorial ] How to setup 3rd-Party Authentication (using Bubble as an example backend) - #4 by SeanHoots
Where someone seems to be enquiring about whether device ID is in the roadmap of Appgyver for push notification. The above post seems to imply that currently Appgyver is unable to retrieve the deviceID of the device, but I am not entirely sure.

I still dont understand why Backendless requires a “device ID”. Neither Apple APNS nor Firebase require that to process Push Notifications - there literally is no “device ID” field/value even passed to either APNS or Firebase.APIs, so why Backendless is requiring it is beyond me. If you find that out let me know because I am curious.

I’m going to try this when Previewer is back up (need to test some other updates besides notifications), so may not get to it until early next week. I’ll let you know how it goes then.

Also looking at using BE, but haven’t gotten to actually testing. Came across this though:

So it will be a 64-bit hex and not derived from the GCM related stuph, so no substringing is going to work. Haven’t seen anything in APGvr for pulling this value.

You could at least maybe test viability of pursuing it further by hard coding the code from your device using one of the “device ID” apps in the store.

Edit: If it works, I’d totally try just fudging the field with any hex of the appropriate length and testing whether backendless actually even cares about it.

Just an update, I am able to push notification using Backendless for IOS devices. The problem I had was Appgyver only allows distribution certificate which meant I can only test the notification when it is live in the app store (I was testing using development APS cert in Backendless with testflight previously which might have explained the error I received).

For the deviceID, I just generate a random 4digit variable to it, so that users can unsubscribe themselves from the notification.