Sequenceablepublic class NotificationActionButton extends Object implements Sequenceable
NotificationRequest#addActionButton to add action buttons to a notification.
A NotificationActionButton object must include an icon, a title, and an associated
IntentAgent defining the action to trigger when the action button is clicked.
SystemCapability.Notification#ANS| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
NotificationActionButton.Builder |
Builder class for
NotificationActionButton object. |
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Sequenceable.Producer<NotificationActionButton> |
PRODUCER |
Creates a
NotificationActionButton instance from a Parcel. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
PacMap |
getAdditionalData() |
Obtains the additional data included in this
NotificationActionButton. |
PixelMap |
getIcon() |
Obtains the icon of this
NotificationActionButton. |
IntentAgent |
getIntentAgent() |
Obtains the
IntentAgent of this NotificationActionButton. |
List<NotificationUserInput> |
getMimeTypeOnlyUserInputs() |
Obtains the
NotificationUserInput objects that only allow values of particular MIME types when this
NotificationActionButton is sent. |
int |
getSemanticActionButton() |
Obtains the semantic action of this
NotificationActionButton. |
String |
getTitle() |
Obtains the title of this
NotificationActionButton. |
List<NotificationUserInput> |
getUserInputs() |
Obtains the
NotificationUserInput objects to be collected from the user when this
NotificationActionButton is sent. |
boolean |
isAutoCreatedReplies() |
Checks whether the platform can automatically generate possible replies for this
NotificationActionButton. |
boolean |
isContextDependent() |
Checks whether this
NotificationActionButton is a contextual action, that is,
whether this NotificationActionButton is dependent on the notification message body. |
boolean |
marshalling(Parcel out) |
Marshals a
NotificationActionButton object into a Parcel. |
String |
toString() |
Returns a string representation of the object.
|
boolean |
unmarshalling(Parcel in) |
Unmarshals a
NotificationActionButton object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasFileDescriptorpublic static final Sequenceable.Producer<NotificationActionButton> PRODUCER
NotificationActionButton instance from a Parcel.public PixelMap getIcon()
NotificationActionButton.NotificationActionButton.public PacMap getAdditionalData()
NotificationActionButton.NotificationActionButton.public List<NotificationUserInput> getUserInputs()
NotificationUserInput objects to be collected from the user when this
NotificationActionButton is sent.NotificationUserInput objects.public List<NotificationUserInput> getMimeTypeOnlyUserInputs()
NotificationUserInput objects that only allow values of particular MIME types when this
NotificationActionButton is sent.NotificationUserInput objects allowing only values of particular MIME types.public boolean isAutoCreatedReplies()
NotificationActionButton.true if the platform can generate replies; returns false otherwise.public boolean isContextDependent()
NotificationActionButton is a contextual action, that is,
whether this NotificationActionButton is dependent on the notification message body. For example,
a contextual NotificationActionButton provides an address in the notification for users to
open a map application.true if this NotificationActionButton is a contextual action;
returns false otherwise.public String getTitle()
NotificationActionButton.NotificationActionButton.public IntentAgent getIntentAgent()
IntentAgent of this NotificationActionButton.IntentAgent of this NotificationActionButton.public int getSemanticActionButton()
NotificationActionButton.NotificationActionButton,
as enumerated in NotificationConstant.SemanticActionButton.public boolean marshalling(Parcel out)
NotificationActionButton object into a Parcel.
A process can call the unmarshalling(ohos.utils.Parcel) method to unmarshal a
NotificationActionButton object from a Parcel to implement inter-process communication (IPC).
marshalling 在接口中 Sequenceableout - Indicates the MessageParcel object for marshalling.
MessageParcel is a child class of Parcel.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
NotificationActionButton object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the MessageParcel object for marshalling.
MessageParcel is a child class of Parcel.true if the unmarshalling is successful; returns false otherwise.public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())