I've implemented a php server that send Firebase Notification to users that are subscribed to a specific topic of my Firebase project.
It works.
In the console of Firebase there is the possibility to set the "expiring time" of the notification (from 1 minute up to 4 weeks).
Is there a method to insert this possibility also in my php server?
Thank you
Firebase is a cloud service designed to power real-time, collaborative applications. Simply add the Firebase library to your application to gain access to a shared data structure; any changes you make to that data are automatically synchronized with the Firebase cloud and with other clients within milliseconds.
Handle notification messages in a backgrounded appA user tap on the notification opens the app launcher by default. This includes messages that contain both notification and data payload (and all messages sent from the Notifications console).
A sender ID: set in the code of your app. Android Studio uses automatically the Sender ID of your Firebase Project. If you are still using GCM, you have probably set manually the sender ID in the code of your app. The sender ID identifies your app to Firebase Cloud Messaging when it asks for a token.
Maximum message rate to a single device For Android, you can send up to 240 messages/minute and 5,000 messages/hour to a single device.
I think you're looking for the time_to_live
parameter:
This parameter specifies how long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks. For more information, see Setting the lifespan of a message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With