Reputation: 10071
I want to implement a notification with overview when the device is in use like WhatsApp:
I know the basic implementation this 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 that case, I don't have the overview. I only have a small icon in the notification bar:
Upvotes: 0
Views: 1222
Reputation: 10071
Finaly, it's just about a Priority level:
notificationBuilder.setPriority(Notification.PRIORITY_HIGH);
Upvotes: 1