Simple Samples for creating Beautiful Notification with NotificationCompat. - Android Development Patterns Ep 2
Heres is the link to Episode 2 NotificationCompat Video.
NotificationCompat is the 2nd ep, of the serie: Android Development Patterns.
Android Development Patterns playlist here
Heres is the link to Android Developers Channel.
-- private void sendNotificationBigPictureStyle(Activity activity){
NotificationCompat.Builder builder = new NotificationCompat.Builder(activity);
builder.setSmallIcon(R.drawable.ic_whatshot_black_24dp);
Bitmap profilePicture = BitmapFactory.decodeResource(
activity.getResources(),
R.drawable.profile_luz
);
Bitmap bigPicture = BitmapFactory.decodeResource(
activity.getResources(),
R.drawable.big_picture
);
NotificationCompat.BigPictureStyle style = new NotificationCompat.BigPictureStyle();
style.bigPicture(bigPicture);
style.setBigContentTitle("New picture from Luz");
style.setSummaryText("Science is awesome, look at.");
style.bigLargeIcon(profilePicture);
builder.setStyle(style);
Notification notification = builder.build();
NotificationManagerCompat.from(activity).notify(NOTIFICATION_ID + 4, notification);
}
--