I'm sending now this request:
'{"data": {"click_action": "FLUTTER_NOTIFICATION_CLICK"} ,"notification": {"body": "${body}", "title": "${title}", "sound": "default"}, "priority": "high", "to": "mytopic"}';
Can I, through some parameter schedule this notification to show only in a given day? for example, I want this notifications arrives in the user phones in 01/02. It is possible?
While searching I found this json:
{
"to": "/topics/discount-offers",
"priority": "high",
"data" : {
"title" : " Christmas Offer ",
"message" : "Grab 90% Discount on Mobile Phones",
"isScheduled" : "true",
"scheduledTime" : "2019-12-13 14:12:00"
}
}
So, I tried to copy "isScheduled" and "scheduledTime" in my project, but it doesn't work.. It continues delivering the message when I send. What can I do to show the notification only in the "scheduledTime"?
This is my json now:
'{"data": {"click_action": "FLUTTER_NOTIFICATION_CLICK", "isScheduled": "true","scheduledTime": "2021-01-26 12:20:00", "title" : "TITLE_HERE","message" : "MESSAGE_HERE",} ,"priority": "high", "to": "myopic"}';
*UPDATE
The notification have to be received in the date selected, in foreground, in background and when the user taps on it, it have to open a given screen. At this moment I'm receiving in foreground, background and redirecting to a given page, BUT, it receives when the message is sent through POST... Have to be delivered in the 'scheduledTime' date/time