I am trying to send a silent notification (I mean a notification that will not be shown in the tray) using this API:
but when I do not set the body key I get this Error:
{
"error": {
"code": 400,
"message": "body parameter is invalid or empty.: 'Body' cannot be null."
}
}
so my question is if there is a way to send a silent notification in android (in ios I know there is the content-available flag)
Tnx in advance!
There are two ways users can receive silent push notifications on Android. Users can long press on a notification to get an option to display notifications silently. Users can also enable silent notifications by heading to Settings > App & Notifications > Search for app and choose> Notifications, and turn it off.
Silent push is a feature where a user will get a notification without even knowing. After getting push notification you will receive a message object which is the parameter of onMessageReceived(RemoteMessage message) RemoteMessage.
Android. Navigate to Settings>Apps & Notifications>Notifications. Choose the name of the app under Recently Sent or click See All to find the app you need. Select the app and tap Advanced, then turn off all notifications or choose an option for how you want notifications to appear.
Silent push notifications are simply notifications that mobile app users receive without any pings, alerts, or interruptions to the user. They arrive on the mobile device and sit in the notification tray until read or dismissed.
Unfortunately silent notification is not yet supported on App Center for Android.
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