Closed RunnableWeb closed 5 years ago
Hi, @RunnableWeb
I recommend creating a data-only payload, and do the treatment and notification show on service
something like:
const message = {
to: user.fcmToken,
data: {
title: 'title message',
body: 'body message',
myButtons: "OK;ROLLBACK"
}
}
then on your fcmservice in-app you build a notification based on the data payload received
Hey @jlcvp, thank you for the response,
by then on your fcmservice in-app you build a notification based on the data
you mean I can configure and customize the notification from and within the app? does that mean that when the user runs the app for the first time the notification will be configured?
I am using Ionic that based on Cordova to build my apps and Cordova is a platform to build Native Mobile Applications using HTML5, CSS, and JavaScript. do you have any idea if it is possible to do that on Cordova apps?
@RunnableWeb Luckly I`m an ionic/cordova developer too. What I can say is that you need a background service that receives the fcm broadcast.
Once the data is sent from your fcm server, the service builds a local notification using the data
object received. Remember you can send any key-value pair on data.
Use this ionic native plugin to help you build your notification within the app and this other native plugin to receive and handle your data object
Hey, @jlcvp Thank you so much for your help, I will have a look at these plugins ASAP.
@RunnableWeb np, feel free to get in touch
my message is something like this
let message ={ to: user.fcmToken, notification: { title: "title message", body:
body message, "sound": "default" } }