Marketing Cloud SDK / com.salesforce.marketingcloud.notifications / NotificationManager / NotificationChannelIdProvider / getNotificationChannelId

getNotificationChannelId

@NonNull abstract fun getNotificationChannelId(@NonNull context: Context, @NonNull notificationMessage: NotificationMessage): String

Provide the notification channel id to be used for the notificationMessage. Providing null or an id for a channel that does not exist will result in Android not showing the notification.

If an exception is thrown during the execution of this method a default channel will be created and used to display the notification.

Parameters

context - Context: The context to use if you need to create the necessary notification channel

notificationMessage - NotificationMessage: The message that represents the notification that will be posted to the provided channel

Return
String: Channel Id