Search in sources :

Example 1 with NotificationChannelGroupCompat

use of androidx.core.app.NotificationChannelGroupCompat in project AntennaPod by AntennaPod.

the class NotificationUtils method createChannels.

public static void createChannels(final Context context) {
    final NotificationManagerCompat mNotificationManager = NotificationManagerCompat.from(context);
    final List<NotificationChannelGroupCompat> channelGroups = Arrays.asList(createGroupErrors(context), createGroupNews(context));
    mNotificationManager.createNotificationChannelGroupsCompat(channelGroups);
    final List<NotificationChannelCompat> channels = Arrays.asList(createChannelUserAction(context), createChannelDownloading(context), createChannelPlaying(context), createChannelError(context), createChannelSyncError(context), createChannelAutoDownload(context), createChannelEpisodeNotification(context));
    mNotificationManager.createNotificationChannelsCompat(channels);
}
Also used : NotificationChannelGroupCompat(androidx.core.app.NotificationChannelGroupCompat) NotificationManagerCompat(androidx.core.app.NotificationManagerCompat) NotificationChannelCompat(androidx.core.app.NotificationChannelCompat)

Aggregations

NotificationChannelCompat (androidx.core.app.NotificationChannelCompat)1 NotificationChannelGroupCompat (androidx.core.app.NotificationChannelGroupCompat)1 NotificationManagerCompat (androidx.core.app.NotificationManagerCompat)1