Class Broadcast
A Broadcast action that can be included on a ReceivedMessage or SendingMessage. Sends an Android broadcast intent when the action button is tapped. Defaults to an intent that works specifically with the official ntfy Android app.
Implements
Inherited Members
Namespace: ntfy.Actions
Assembly: ntfy.dll
Syntax
public class Broadcast : Action, IAction
Constructors
| Improve this Doc View SourceBroadcast(string)
Constructor for a Broadcast action.
Declaration
public Broadcast(string label)
Parameters
Type | Name | Description |
---|---|---|
string | label | The label for the action. |
Properties
| Improve this Doc View SourceClear
Whether to clear the associated notification after this Broadcast action button is tapped.
Defaults to false
.
Declaration
[JsonProperty("clear", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)]
public bool? Clear { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Extras
The dictionary representation of the Android intent extras of this Broadcast action. Currently, only string extras are supported.
Declaration
[JsonProperty("extras", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)]
public Dictionary<string, object>? Extras { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, object> |
Intent
Android intent name of this Broadcast action.
Default is io.heckel.ntfy.USER_ACTION
Declaration
[JsonProperty("intent", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)]
public string? Intent { get; set; }
Property Value
Type | Description |
---|---|
string |
Type
The type of this action, as an ActionType enum.
Declaration
[JsonIgnore]
public override ActionType Type { get; }
Property Value
Type | Description |
---|---|
ActionType |