added in API level 23
Notification.CarExtender
public
static
final
class
Notification.CarExtender
extends Object
implements
Notification.Extender
| java.lang.Object | |
| ↳ | android.app.Notification.CarExtender |
Helper class to add Android Auto extensions to notifications. To create a notification with car extensions:
- Create an
Notification.Builder, setting any desired properties. - Create a
Notification.CarExtender. - Set car-specific properties using the
addandsetmethods ofNotification.CarExtender. - Call
extend(Notification.Extender)to apply the extensions to a notification.
Notification notification = new Notification.Builder(context)
...
.extend(new CarExtender()
.set*(...))
.build();
Car extensions can be accessed on an existing notification by using the
CarExtender(Notification) constructor, and then using the get methods
to access values.