Skip to content

Instantly share code, notes, and snippets.

@sudiptamondal
Created February 10, 2020 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudiptamondal/d2c635be8b82f9e457e168d5ea7e8fca to your computer and use it in GitHub Desktop.
Save sudiptamondal/d2c635be8b82f9e457e168d5ea7e8fca to your computer and use it in GitHub Desktop.
CreateNotif.java-1
private void createNotificationChannel() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel("1000111", "cld_notif_channel", NotificationManager.IMPORTANCE_DEFAULT);
channel.setDescription("cld_notif_desc");
NotificationManager notificationManager = getSystemService(NotificationManager.class);
notificationManager.createNotificationChannel(channel);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment