Repository navigation
Notification channel names
On Android 8.0 (API 26) and above, the Mobile Messaging SDK creates several notification channels. Users see these channels in Settings → Apps → Your app → Notifications. By default, each channel name is your app name plus a short English description, for example "MyApp High Priority". The SDK also includes translations of these names for Chinese (Simplified), Swahili, Kinyarwanda and Luganda.
You can rename the channels or translate them into any language your app supports. To do so, override the SDK's string resources in your application.
The SDK creates these channels unless its default channels are disabled, see Notification channels.
| String resource | Default value | Used for |
|---|---|---|
mm_notification_channel_default |
%1$s |
Notifications with sound and vibration |
mm_notification_channel_vibration |
%1$s Vibration |
Notifications with vibration only (no sound) |
mm_notification_channel_sound |
%1$s Sound |
Notifications with sound only (no vibration) |
mm_notification_channel_quiet |
%1$s Quiet |
Notifications with no sound and no vibration |
Like the default channels, these are created unless the SDK's default channels are disabled, and only when heads-up notifications are enabled, which is the default. See Notification settings.
| String resource | Default value | Used for |
|---|---|---|
mm_notification_channel_high_priority |
%1$s High Priority |
Heads-up notifications with sound and vibration |
mm_notification_channel_high_priority_vibration |
%1$s High Priority, Vibration |
Heads-up notifications with vibration only |
mm_notification_channel_high_priority_sound |
%1$s High Priority, Sound |
Heads-up notifications with sound only |
mm_notification_channel_high_priority_quiet |
%1$s High Priority, Quiet |
Heads-up notifications with no sound and no vibration |
These channels are created only if you set a custom channel with MobileMessaging.Builder.withCustomNotificationChannel(channelId, channelName, notificationAudio) and the SDK's default channels aren't disabled, see Custom sound channels. They're used for messages that play your custom sound.
For these resources, %1$s is replaced with your app name followed by the channelName you passed, for example "MyApp Promotions".
| String resource | Default value | Used for |
|---|---|---|
mm_notification_channel_custom |
%1$s |
Custom sound, no vibration |
mm_notification_channel_custom_vibration |
%1$s Vibration |
Custom sound with vibration |
mm_notification_channel_custom_high_priority |
%1$s High Priority |
Custom sound, heads-up, no vibration (only if heads-up is enabled) |
mm_notification_channel_custom_high_priority_vibration |
%1$s High Priority, Vibration |
Custom sound, heads-up, with vibration (only if heads-up is enabled) |
These channels are created only when the SDK finds no existing channel for a notification, see Channel selection and fallback.
| String resource | Default value | Used for |
|---|---|---|
mm_notification_channel_fallback |
%1$s Notifications |
Notifications with sound and vibration |
mm_notification_channel_fallback_vibration |
%1$s Notifications, Vibration |
Notifications with vibration only (no sound) |
mm_notification_channel_fallback_sound |
%1$s Notifications, Sound |
Notifications with sound only (no vibration) |
mm_notification_channel_fallback_quiet |
%1$s Notifications, Quiet |
Notifications with no sound and no vibration |
mm_notification_channel_fallback_high_priority |
%1$s Notifications, High Priority |
Heads-up notifications with sound and vibration |
mm_notification_channel_fallback_high_priority_vibration |
%1$s Notifications, High Priority, Vibration |
Heads-up notifications with vibration only |
mm_notification_channel_fallback_high_priority_sound |
%1$s Notifications, High Priority, Sound |
Heads-up notifications with sound only |
mm_notification_channel_fallback_high_priority_quiet |
%1$s Notifications, High Priority, Quiet |
Heads-up notifications with no sound and no vibration |
%1$s is replaced with your app name (for custom sound channels, your app name followed by your channel name). You can:
- put it anywhere in the string, which helps in languages with a different word order, or
- leave it out, so the channel name doesn't include the app name.
Add the strings you want to change to your app's strings.xml. You only need to include the ones you change. Any string you leave out keeps the SDK default.
The SDK's translations are in values-zh-rCN, values-sw, values-rw and values-lg. On devices set to those languages they take precedence over your values/strings.xml, so override the strings in those folders too if your change should apply there.
<!-- app/src/main/res/values/strings.xml (default / English) -->
<resources>
<string name="mm_notification_channel_default">General notifications</string>
<string name="mm_notification_channel_high_priority">Important notifications</string>
</resources><!-- app/src/main/res/values-de/strings.xml (German) -->
<resources>
<string name="mm_notification_channel_default">Allgemeine Benachrichtigungen</string>
<string name="mm_notification_channel_vibration">%1$s – Vibration</string>
<string name="mm_notification_channel_sound">%1$s – Ton</string>
<string name="mm_notification_channel_quiet">%1$s – Lautlos</string>
<string name="mm_notification_channel_high_priority">Wichtige Benachrichtigungen</string>
<string name="mm_notification_channel_high_priority_vibration">%1$s – Wichtig, Vibration</string>
<string name="mm_notification_channel_high_priority_sound">%1$s – Wichtig, Ton</string>
<string name="mm_notification_channel_high_priority_quiet">%1$s – Wichtig, lautlos</string>
</resources>- When names update: the SDK applies channel names when it starts. After you change a string, or the user changes the device language, the new names appear the next time the app starts.
- User settings are kept: renaming a channel doesn't reset what the user chose for it, such as sound, importance or whether it's blocked. Channel IDs never change.
-
Formatting: only use the
%1$splaceholder, and write a literal percent sign as%%. Any other format specifier (for example%2$sor%d) makes formatting fail. If that happens, the SDK logs an error and uses the placeholder value as the channel name: your app name, or for custom sound channels your app name followed by your channel name. Escape apostrophes as\', as in any Android string resource.
If you have any questions or suggestions, feel free to send an email to support@infobip.com or create an issue.