On Android, notification urgency is controlled by the importance level setting and by Notification Channels, which are mandatory on Android 8.0 (API 26) and higher.
Importance level
- On Android 8.0+ it sets the importance of the Notification Channel at the moment that channel is created.
- On Android 7.1 (API 25) and lower it sets the notification priority.
- In the push preset it is called User-visible importance level with the options None, Low, Medium, High and Urgent. In the API and the legacy form the values range from -2 (low) to 2 (urgent). Urgent (
1/2) plays a sound and can show a heads-up (floating) notification; High (0) plays a sound and shows in the status bar; lower levels are progressively quieter.
Sending to a specific channel
Pass the channel name in pw_channel inside android_root_params (in the Control Panel, add it as JSON to the Root params of the Android settings):
{
"android_root_params": {
"pw_channel": "YOUR_CHANNEL_NAME"
}
}
If the channel does not exist yet on the device, the Pushwoosh Android SDK creates it, deriving its settings (importance, sound, vibration) from the push payload. See Notification channels in the Pushwoosh Docs.
Important: channel settings are set only once
A channel's settings are fixed when the channel is first created on the device. Later pushes to the same channel cannot raise its importance - sending Importance level 2 to a channel that was created as "default" will not produce a heads-up notification. If high-priority pushes are not behaving as expected:
- Send to a new, previously unused
pw_channelname so a fresh channel is created with the correct importance. - Or reset the device's channels: Settings → Apps → your app → Storage → Clear data.
- Check whether your app creates channels in its own code - those settings win over the payload; the app must use
IMPORTANCE_HIGH. - Check aggressive battery optimisation (notably Samsung): set the app to Unrestricted and remove it from Sleeping apps.
User permissions and control
Your app needs notification permission (POST_NOTIFICATIONS on Android 13+) to show notifications at all. Users can then mute, block or change the sound of any individual channel in the system app notification settings, and those choices always win.
SDK version
Automatic channel creation is supported since Pushwoosh Android SDK 5.4.0. Use the latest 6.x release of the SDK for up-to-date channel and Android 13+ permission handling.
Comments
0 comments
Please sign in to leave a comment.