Using Android Notification Channels

Recently introduced as part of Android 8.0 (Oreo), notification channels give developers more control over push notification customization and management. 

If your app targets Android 8 users, you must implement one or more notification channels in order to send notifications to your users. Targeting Android 8 users for a push notification without specifying a valid notifications channel will cause the message to fail to post, and the system will log an error.

Notification channels allow app developers to categorize their push notifications based on the type of content. With channels, you can modify the color of the notification,  the sound and vibration it makes, how prominently the notification appears on the user's device, and more. See Android's documentation for more info. 

1. Set up Android Notification Channels in Leanplum

To activate notification channels, please reach out to your customer success manager. Doing so will allow developers to add, delete, or modify notification channels via our API. 

Developers: Add and define the notification channels that you would like to be accessible in the Leanplum dashboard. See our API docs for more on the methods addAndroidNotificationChannel and deleteAndroidNotificationChannel.

2. Send a push notification with Android Notification Channels

Once a developer adds a notification channel via our API, your new channel should be accessible for use in the Leanplum dashboard. 

Select your desired channel from the dashboard to send a push notification. The Notification channel setting should be in Advanced Options in the message composer.

screen_shot_2017-09-17_at_11.25.06_pm_720.png

Tip: Be sure to test any new channels on a real device before sending notifications out to users. 

To see all the notification channels defined in Leanplum, see our API docs for more information on the getAndroidNotificationChannels API call. These channels are also visible in the Leanplum message composer — just click the current Notification channel under Advanced Options to reveal a dropdown with all your Android notification channels.

 


Was this article helpful?
Have more questions? Submit a request