NotificationCompat.BigPictureStyle

Added in 1.1.0

class NotificationCompat.BigPictureStyle : NotificationCompat.Style


Helper class for generating large-format notifications that include a large image attachment. If the platform does not provide large-format notifications, this method has no effect. The user will always see the normal notification view. This class is a "rebuilder": It attaches to a Builder object and modifies its behavior, like so:

Notification notification = new NotificationCompat.Builder(mContext)
    .setContentTitle("New photo from " + sender.toString())
    .setContentText(subject)
    .setSmallIcon(R.drawable.new_post)
    .setLargeIcon(aBitmap)
    .setStyle(new Notification.BigPictureStyle()
        .bigPicture(aBigBitmap))
    .build();
See also
bigContentView

Summary

Public constructors

Public functions

NotificationCompat.BigPictureStyle

Override the large icon when the big notification is shown.

NotificationCompat.BigPictureStyle
@RequiresApi(value = 23)
bigLargeIcon(i: Icon?)

Override the large icon when the big notification is shown.

NotificationCompat.BigPictureStyle

Provide the bitmap to be used as the payload for the BigPicture notification.

NotificationCompat.BigPictureStyle
@RequiresApi(value = 31)
bigPicture(i: Icon?)

Provide an icon to be used as the payload for the BigPicture notification.

NotificationCompat.BigPictureStyle

Overrides ContentTitle in the big form of the template.

NotificationCompat.BigPictureStyle
@RequiresApi(value = 31)
setContentDescription(contentDescription: CharSequence?)

Set the content description of the big picture.

NotificationCompat.BigPictureStyle

Set the first line of text after the detail section in the big form of the template.

NotificationCompat.BigPictureStyle

When set, the big picture of this style will be promoted and shown in place of the large icon in the collapsed state of this notification.

Inherited functions

From androidx.core.app.NotificationCompat.Style
Notification?

If this Style object has been set on a notification builder, this method will build that notification and return it.

Unit

Link this rich notification style with a notification builder.

Public constructors

BigPictureStyle

Added in 1.1.0
BigPictureStyle()

BigPictureStyle

Added in 1.1.0
BigPictureStyle(builder: NotificationCompat.Builder?)

Public functions

bigLargeIcon

Added in 1.1.0
fun bigLargeIcon(b: Bitmap?): NotificationCompat.BigPictureStyle

Override the large icon when the big notification is shown.

bigLargeIcon

Added in 1.10.0
@RequiresApi(value = 23)
fun bigLargeIcon(i: Icon?): NotificationCompat.BigPictureStyle

Override the large icon when the big notification is shown.

bigPicture

Added in 1.1.0
fun bigPicture(b: Bitmap?): NotificationCompat.BigPictureStyle

Provide the bitmap to be used as the payload for the BigPicture notification.

bigPicture

Added in 1.9.0
@RequiresApi(value = 31)
fun bigPicture(i: Icon?): NotificationCompat.BigPictureStyle

Provide an icon to be used as the payload for the BigPicture notification. Note that certain features (like animated Icons) may not work on all versions.

setBigContentTitle

Added in 1.1.0
fun setBigContentTitle(title: CharSequence?): NotificationCompat.BigPictureStyle

Overrides ContentTitle in the big form of the template. This defaults to the value passed to setContentTitle().

setContentDescription

Added in 1.8.0
@RequiresApi(value = 31)
fun setContentDescription(contentDescription: CharSequence?): NotificationCompat.BigPictureStyle

Set the content description of the big picture.

setSummaryText

Added in 1.1.0
fun setSummaryText(cs: CharSequence?): NotificationCompat.BigPictureStyle

Set the first line of text after the detail section in the big form of the template.

showBigPictureWhenCollapsed

Added in 1.7.0
@RequiresApi(value = 31)
fun showBigPictureWhenCollapsed(show: Boolean): NotificationCompat.BigPictureStyle

When set, the big picture of this style will be promoted and shown in place of the large icon in the collapsed state of this notification.