Notification.Action


public static class Notification.Action
extends Object implements Parcelable

java.lang.Object
   ↳ android.app.Notification.Action


Structure to encapsulate a named action that can be shown as part of this notification. It must include an icon, a label, and a PendingIntent to be fired when the action is selected by the user.

Apps should use Notification.Builder.addAction(int,CharSequence,PendingIntent) or Notification.Builder.addAction(Notification.Action) to attach actions.

As of Android Build.VERSION_CODES.S, apps targeting API level Build.VERSION_CODES.S or higher won't be able to start activities while processing broadcast receivers or services in response to notification action clicks. To launch an activity in those cases, provide a PendingIntent for the activity itself.

Summary

Nested classes

class Notification.Action.Builder

Builder class for Action objects. 

interface Notification.Action.Extender

Extender interface for use with Builder.extend

class Notification.Action.WearableExtender

Wearable extender for notification actions. 

Constants

int EMPHASIS_AUTO

The action\u2019s visual emphasis is generally the default, or may be automatically determined by the system based on context.

int EMPHASIS_PRIMARY

The action\u2019s visual emphasis may indicate that this action is more important than others.

int EMPHASIS_SECONDARY

The action\u2019s visual emphasis may indicate that this action is less important than others.

int