NotificationCompat.Action.WearableExtender

public final class NotificationCompat.Action.WearableExtender implements NotificationCompat.Action.Extender


Wearable extender for notification actions. To add extensions to an action, create a new NotificationCompat.Action.WearableExtender object using the WearableExtender() constructor and apply it to a NotificationCompat.Action.Builder using extend.

NotificationCompat.Action action = new NotificationCompat.Action.Builder(
        R.drawable.archive_all, "Archive all", actionIntent)
        .extend(new NotificationCompat.Action.WearableExtender()
                .setAvailableOffline(false))
.build();

Summary

Public constructors

Create a NotificationCompat.Action.WearableExtender with default options.

Create a NotificationCompat.Action.WearableExtender by reading wearable options present in an existing notification action.

Public methods

@Override @NonNull NotificationCompat.Action.WearableExtender
@Override @NonNull NotificationCompat.Action.Builder

Apply wearable extensions to a notification action that is being built.

@Nullable CharSequence

This method is deprecated.

This method has no effect starting with Wear 2.0.

@Nullable CharSequence

This method is deprecated.

This method has no effect starting with Wear 2.0.

boolean

Get a hint that this Action should be displayed inline - i.e.

boolean

Get a hint that this Action will launch an Activity directly, telling the platform that it can generate the appropriate transitions

@Nullable CharSequence

This method is deprecated.

This method has no effect starting with Wear 2.0.

boolean

Get whether this action is available when the wearable device is not connected to a companion device.

@NonNull NotificationCompat.Action.WearableExtender