public final class TriggerInfo extends Object
IntentAgentHelper#triggerIntentAgent.SystemCapability.Notification#ANS| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
TriggerInfo.Builder |
A builder class for
TriggerInfo objects. |
| 构造器 | 说明 |
|---|---|
TriggerInfo(String permission,
IntentParams extraInfo,
Intent intent,
int code) |
A constructor used to create a
TriggerInfo instance based on the input parameters. |
TriggerInfo(TriggerInfo paramInfo) |
A constructor used to create a
TriggerInfo instance by copying parameters from an existing one. |
public TriggerInfo(String permission, IntentParams extraInfo, Intent intent, int code)
TriggerInfo instance based on the input parameters.permission - Indicates the permission required for an IntentAgent recipient.
This parameter is valid only when the IntentAgent is triggered to send common events.extraInfo - Indicates the custom extra data you want to add for triggering an IntentAgent.intent - Indicates the extra Intent.
If flags in IntentAgentInfo contains IntentAgentConstant.Flags#CONSTANT_FLAG,
this parameter is invalid. If flags contains IntentAgentConstant.Flags#REPLACE_ELEMENT,
IntentAgentConstant.Flags#REPLACE_ACTION, IntentAgentConstant.Flags#REPLACE_URI,
IntentAgentConstant.Flags#REPLACE_ENTITIES, and IntentAgentConstant.Flags#REPLACE_BUNDLE,
the element, action, uri, entities, and bundleName attributes of the
Intent specified in this parameter will be used to replace the
corresponding attributes in the original Intent, respectively.
If this parameter is null, the original Intent remains unchanged.code - Indicates the result code provided for the target of the IntentAgent.public TriggerInfo(TriggerInfo paramInfo)
TriggerInfo instance by copying parameters from an existing one.paramInfo - Indicates the existing TriggerInfo object.