// Supply custom RemoteViews to use instead of the platform template
// in the expanded form
public Builder setCustomBigContentView(RemoteViews contentView);
A notification's big view appears only when the notification is expanded, which happens when
- the notification is at the top of the notification drawer, or
- the user expands the notification with a gesture.
However, there is a trick to push the notification to the top of the list where it would be expanded:
setOngoing(true)
.
// Sets an ID for the notification, so it can be updated
mNotificationManager.notify(NOTIFICATION_ID, mNotificationBuilder.build());
// Use the SAME Builder for each update.
mNotificationBuilder.setContentText("new text");
// Because the ID remains unchanged, the existing notification is updated.
mNotificationManager.notify(NOTIFICATION_ID, mNotificationBuilder.build());
public Builder setStyle(
new NotificationCompat.BigTextStyle().bigText(CharSequence cs);
How to fix crash - RemoteServiceException: Bad notification posted from package: Couldn't expand RemoteViews
for unknown reason you are not allowed to reference dimen in the root view of the custom remote view! so you have to hard code it like
android:layout_height="128dp"
notification theme is wrong on Android 7 !
https://developer.android.com/guide/topics/ui/notifiers/notifications.html
https://developer.android.com/training/notify-user/expanded.html
https://developer.android.com/reference/android/widget/RemoteViews.html
http://www.tutorialsface.com/2015/08/android-custom-notification-tutorial/
http://www.androidbegin.com/tutorial/android-custom-notification-tutorial/