public class PushAction

  1. Object
  2. PushAction
Encapsulates a push notification action. Available actions for a push notification are defined by the PushActionsProvider#getPushActionCategories() implementation.

Constructors

public PushAction(String id, String title, String icon)Creates a new push action
public PushAction(String id, String title, String icon, String textInputPlaceholder, String textInputButtonText)Creates a new push action
public PushAction(String id, String title)Creates a new push action
public PushAction(String title)Creates a new push action

Methods

public String getId()Gets the ID of the action.
public String getTitle()The title of the action.
public String getIcon()The icon of the action.
public String getTextInputPlaceholder()The placeholder text to use for text input on this action.
public String getTextInputButtonText()The button label for the “reply” button on the text input field.

Inherited methods

Constructor details

PushAction

public PushAction(String id, String title, String icon)
Creates a new push action

Parameters

id String
The ID of the action. This is the id that will be available in PushContent#getActionId() if the user selected this action on the push notification.
title String
The title of the action. This is the button label in the push notification.
icon String
Icon for the action. Not supported currently on most platforms.

PushAction

public PushAction(String id, String title, String icon, String textInputPlaceholder, String textInputButtonText)
Creates a new push action

Parameters

id String
The ID of the action. This is the id that will be available in PushContent#getActionId() if the user selected this action on the push notification.
title String
The title of the action. This is the button label in the push notification.
icon String
Icon for the action. Not supported currently on most platforms.
textInputPlaceholder String
Placeholder text to use for the text input field.
textInputButtonText String
Text to be used for the “reply” button in the text input field.

PushAction

public PushAction(String id, String title)
Creates a new push action

Parameters

id String
The ID of the action. This is the id that will be available in PushContent#getActionId() if the user selected this action on the push notification.
title String
The title of the action. This is the button label in the push notification.

PushAction

public PushAction(String title)
Creates a new push action

Parameters

title String
The title and id of the action. This is the button label in the push notification.

Method details

getId

public String getId()
Gets the ID of the action. This is the value that will be made available inside the PushCallback#push(java.lang.String) method via PushContent#getActionId() if the user selects this action in a push notification.

Returns

the id The ID of the action.

getTitle

public String getTitle()
The title of the action. This will be the label for the action’s button in the push notification.

Returns

the title The title of the action.

getIcon

public String getIcon()
The icon of the action. Not supported yet on most platforms.

Returns

the icon The icon for the action.

getTextInputPlaceholder

public String getTextInputPlaceholder()
The placeholder text to use for text input on this action. Either #textInputButtonText or #textInputPlaceholder must be non-null for the action to include a text input.

Returns

the textInputPlaceholder

getTextInputButtonText

public String getTextInputButtonText()
The button label for the “reply” button on the text input field. Either #textInputButtonText or #textInputPlaceholder must be non-null for the action to include a text input.

Returns

the textInputButtonText