How to implement Android Notification with overview like WhatsApp? -
i want implement notification overview when device in use whatsapp:
i know basic implementation way:
pendingintent pendingintent = pendingintent.getactivity(this, 0, new intent(this, mainactivity.class), 0); notification notification = new notification.builder(this) .setcontenttitle("title") .setcontenttext("message") .setsmallicon(r.drawable.ic_notif) .setcontentintent(mpendingintent) .build(); notificationmanager notificationmanager = (notificationmanager) getsystemservice(notification_service); notificationmanager.notify(1, notification);
but in case, don't have overview. have small icon in notification bar:
finaly, it's priority level:
notificationbuilder.setpriority(notification.priority_high);
Comments
Post a Comment