Skip to content

Instantly share code, notes, and snippets.

@SubhrajyotiSen
Created December 5, 2021 19:40
Show Gist options
  • Save SubhrajyotiSen/c4f79c71e82e209dc05689aa7b7e6899 to your computer and use it in GitHub Desktop.
Save SubhrajyotiSen/c4f79c71e82e209dc05689aa7b7e6899 to your computer and use it in GitHub Desktop.
@Nullable
public NotificationChannelCompat getNotificationChannelCompat(@NonNull String channelId) {
if (Build.VERSION.SDK_INT >= 26) {
NotificationChannel channel = getNotificationChannel(channelId);
if (channel != null) {
return new NotificationChannelCompat(channel);
}
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment