CarAppExtender.Builder

public static final class CarAppExtender.Builder
extends Object

java.lang.Object
   ↳ androidx.car.app.notification.CarAppExtender.Builder


A builder of CarAppExtender.

Summary

Public constructors

Builder()

Creates an empty CarAppExtender.Builder instance.

Public methods

CarAppExtender.Builder addAction(int icon, CharSequence title, PendingIntent intent)

Adds an action to this notification.

CarAppExtender build()

Constructs the CarAppExtender defined by this builder.

CarAppExtender.Builder setChannelId(String channelId)

For Android Automotive OS only, sets the channel id of the notification channel to be used in the car.

CarAppExtender.Builder setColor(CarColor color)

Sets the background color of the notification in the car screen.

CarAppExtender.Builder setContentIntent(PendingIntent contentIntent)

Supplies a PendingIntent to send when the notification is clicked in the car.

CarAppExtender.Builder setContentText(CharSequence contentText)

Sets the content text of the notification in the car screen.

CarAppExtender.Builder setContentTitle(CharSequence contentTitle)

Sets the title of the notification in the car screen.

CarAppExtender.Builder setDeleteIntent(PendingIntent deleteIntent)

Supplies a PendingIntent to send when the user clears the notification by either using the "clear all" functionality in the notification center, or tapping the individual "close" buttons on the notification in the car screen.

CarAppExtender.Builder setImportance(int importance)

For Android Auto only, sets the importance of the notification in the car screen.

CarAppExtender.Builder