Marketing Cloud SDK / com.salesforce.marketingcloud.notifications / NotificationManager / createDefaultNotificationChannel

createDefaultNotificationChannel

@NonNull open static fun createDefaultNotificationChannel(@NonNull context: Context, forceRecreate: Boolean): String

Will create the default notification channel used by the SDK.

Parameters

context - Context: Context

forceRecreate - Boolean: It true, the SDK will create the channel even if it already exists. If you have provided localization for the SDK's channel name R.string.mcsdk_default_notification_channel_name then you will need to pass true when the user changes the language on their device.

Return
String: The channel id of the created notification channel.

@NonNull open static fun createDefaultNotificationChannel(@NonNull context: Context): String

Will create the default notification channel used by the SDK only if it does not already exist.

Parameters

context - Context: Context

Return
String: The channel id of the created notification channel.