Silent Push Notifications

How to send notifications to your app without having users informed

Overview

Sometimes you need to pass some data to the app, update the app in the background, or get new data from your server without having users informed. Here come Silent Push Notifications making it quite easy!

Silent Push Notifications are delivered to users' devices with no alert, sound, or icon badge. When a silent push arrives, the app is woken up in the background. Users don't recognize any alerts and don't see any push content.

By sending Silent Push Notifications, you can notify your app about new content available to download, perform some tasks in the background, get new data from your server, or pass custom data to the app. There are plenty of use cases, and the implementation is pretty simple: Silent Push Notifications are available out-of-the-box for all Pushwoosh users.

Silent Push Notifications come in handy when you need to clean up the user base: every time a push is sent, all invalid or non-existent push tokens are removed from our database. That's why Silent Push Notifications are used in Uninstalls Tracking, which keeps your user base valid and updated. To learn more about Uninstalls Tracking, please refer to the Knowledge Base article explaining the basics.

Implementation

Mobile Silent Pushes

Control Panel

To send a Silent Push Notification to your mobile app, check the checkbox Silent Push in the iOS and Android push settings of the Send Push form.

iOS
Android

API

When creating a notification via /createMessage API request, set the "ios_silent" and "android_silent" parameter to 1.

POST https://cp.pushwoosh.com/json/1.3 /createMessage
{
"request": {
"application": "XXXXX-XXXXX",
"auth": ACCESS_TOKEN,
"notifications": [{
"send_date": "now",
"ignore_user_timezone": true,
"content": "test",
"platforms": [1, 3],
"ios_silent": 1,
"android_silent": 1
}]
}
}

Web Silent Pushes

Silent Push Notifications are supported for Chrome and Firefox.

To send Web Silent Pushes, you first have to create a Filter in your Pushwoosh account with the SDK Version tag values equal or more than 3.5.0.0.

Important!

It's crucial to apply the Filter because users with the SDK version less than 3.5.0.0 will receive your message with an alert and will see its content.

Control Panel

  1. Fill in the Chrome/Firefox root params field with the {"silent": "true"} value.

Chrome
Firefox

2. Choose a Filter in the Filters tab.

3. Press Woosh!

API

In a /createMessage request, specify the {"silent":"true"} value for the "chrome_root_params" and "firefox_root_params".

Make sure to specify the name of the Filter exactly as you've created for targeting 3.5.0.0 SDK users.

POST https://cp.pushwoosh.com/json/1.3 /createMessage
{
"request": {
"application": "XXXXX-XXXXX",
"auth": ACCESS_TOKEN,
"notifications": [{
"send_date": "now",
"ignore_user_timezone": true,
"content": "test",
"platforms": [12, 13],
"firefox_root_params": {"silent": "true"},
"chrome_root_params": {"silent": "true"},
"filter": “Web Silent Push”
}]
}
}

That's it!

The message will be delivered to users' browsers, and the PushDelivered event will fire; you'll see this message in your Message History, while users won't be informed of your message arrived.