Class LocalNotification.Action

java.lang.Object
com.codename1.notifications.LocalNotification.Action
Enclosing class:
LocalNotification

public static class LocalNotification.Action extends Object
A single action button attached to a local notification. An action may optionally include an inline text input (quick reply) by setting a placeholder and reply button text via LocalNotification#addInputAction(String, String, String, String).
  • Constructor Details

    • Action

      public Action(String id, String title)

      Creates an action.

      Parameters
      • id: the action id reported back when the user taps the action

      • title: the button label

    • Action

      public Action(String id, String title, String icon)

      Creates an action with an icon.

      Parameters
      • id: the action id reported back when the user taps the action

      • title: the button label

      • icon: an icon name for the action (not supported on all platforms)

  • Method Details

    • getId

      public String getId()

      Returns the action id.

      Returns

      the action id

    • getTitle

      public String getTitle()

      Returns the button label.

      Returns

      the title

    • getIcon

      public String getIcon()

      Returns the icon name.

      Returns

      the icon, or null

    • getTextInputPlaceholder

      public String getTextInputPlaceholder()

      Returns the placeholder text for the inline text input, or null when the action has no text input.

      Returns

      the text input placeholder, or null

    • getTextInputButtonText

      public String getTextInputButtonText()

      Returns the label of the reply button for the inline text input, or null when the action has no text input.

      Returns

      the reply button text, or null

    • isTextInput

      public boolean isTextInput()

      Returns true if this action has an inline text input (quick reply).

      Returns

      true if this is a text input action