public class

NotificationChannelRegistry

extends Object
java.lang.Object
   ↳ com.urbanairship.push.notifications.NotificationChannelRegistry

Class Overview

Compatibility class for registering notification channels.

Summary

Public Methods
void createDeferredNotificationChannel(NotificationChannelCompat channelCompat)
Like createNotificationChannel(NotificationChannelCompat), but on Android O and above, the channel will not be created with the NotificationManager until it is accessed with getNotificationChannel(String).
void createNotificationChannel(NotificationChannelCompat channelCompat)
Adds a notification channel and saves it to disk.
void deleteNotificationChannel(String id)
Deletes a notification channel, by identifier.
PendingResult<NotificationChannelCompat> getNotificationChannel(String id)
Gets a notification channel by identifier.
NotificationChannelCompat getNotificationChannelSync(String id)
Gets a notification channel by identifier.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void createDeferredNotificationChannel (NotificationChannelCompat channelCompat)

Like createNotificationChannel(NotificationChannelCompat), but on Android O and above, the channel will not be created with the NotificationManager until it is accessed with getNotificationChannel(String).

Parameters
channelCompat A NotificationChannelCompat.

public void createNotificationChannel (NotificationChannelCompat channelCompat)

Adds a notification channel and saves it to disk. This method is a no-op if a channel is already created with the same identifier. On Android O and above, this method will also create an equivalent NotificationChannel with NotificationManager.

Parameters
channelCompat A NotificationChannelCompat.

public void deleteNotificationChannel (String id)

Deletes a notification channel, by identifier. On Android O and above, this method will also delete the equivalent NotificationChannel on NotificationManager.

Parameters
id The notification channel identifier.

public PendingResult<NotificationChannelCompat> getNotificationChannel (String id)

Gets a notification channel by identifier.

Parameters
id The notification channel identifier.
Returns
  • A PendingResult of NotificationChannelCompat.

public NotificationChannelCompat getNotificationChannelSync (String id)

Gets a notification channel by identifier.

Parameters
id The notification channel identifier.
Returns
  • A NotificationChannelCompat, or null if one could not be found.