Skip to content

Instantly share code, notes, and snippets.

@hitherejoe hitherejoe/ Secret
Last active Apr 13, 2018

What would you like to do?
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
int notifyId = 1;
String channelId = "some_channel_id";
Notification notification = new Notification.Builder(MainActivity.this)
.setContentTitle("Some Message")
.setContentText("You've received new messages!")
notificationManager.notify(id, notification);

This comment has been minimized.

Copy link

ritikrishu commented Apr 13, 2018

Line number 10 should be setChannelId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.