FireBase Push Notifications

NanaYaw3 years ago

Okay , but is it possible i can also modify the content of the notification being sent to the device ? for instance if my Freematics Model H is online i dont want a message like

alert = "Freematics Model H online at 2021-08-30 20:56:36";

i want something like

{
  "aps" : {
     "alert" : {
        "title" : "<Device ID>,
        "subtitle" : ""
        "body" : "iS Online",
     },
    
  },
  "deviceID" : "Model H Device ID"
}

is there anyway i can control this ?

Anton Tananaev3 years ago

You can change the template, but it sounds like you want to send a data only notification. In that case you probably have to change the server source code.

NanaYaw3 years ago

Okay and thank you for the support, i will first start looking at understanding the server source code, and then make changes.

khushbugarg2 years ago

Hello @NanaYaw. I am facing the same issue and followed the same steps: changed the token with the app's token but i am still not receiving notification. can you help

Gaurav4 months ago

How can we change the template Anton?

Anton Tananaev4 months ago

You can change the files in the templates folder.