1import { NotificationChannel, NotificationChannelInput } from './NotificationChannelManager.types'; 2 3/** 4 * Assigns the channel configuration to a channel of a specified name (creating it if need be). 5 * This method lets you assign given notification channel to a notification channel group. 6 * 7 * > **Note:** For some settings to be applied on all Android versions, it may be necessary to duplicate the configuration across both 8 * > a single notification and its respective notification channel. 9 * 10 * For example, for a notification to play a custom sound on Android versions **below** 8.0, 11 * the custom notification sound has to be set on the notification (through the [`NotificationContentInput`](#notificationcontentinput)), 12 * and for the custom sound to play on Android versions **above** 8.0, the relevant notification channel must have the custom sound configured 13 * (through the [`NotificationChannelInput`](#notificationchannelinput)). For more information, 14 * see [Set custom notification sounds on Android](#set-custom-notification-sounds). 15 * @param channelId The channel identifier. 16 * @param channel Object representing the channel's configuration. 17 * @return A Promise which resolving to the object (of type [`NotificationChannel`](#notificationchannel)) describing the modified channel 18 * or to `null` if the platform does not support notification channels. 19 * @platform android 20 * @header channels 21 */ 22export default async function setNotificationChannelAsync( 23 channelId: string, 24 channel: NotificationChannelInput 25): Promise<NotificationChannel | null> { 26 console.debug('Notification channels feature is only supported on Android.'); 27 return null; 28} 29