# Class LocalNotification.Action

java.lang.Object
com.codename1.notifications.LocalNotification.Action

Enclosing class:
  `LocalNotification`

public static class LocalNotification.Action extends java.lang.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 Summary

  Constructors
  Constructor
  Description
  `Action(String id, String title)`
  Creates an action.
  `Action(String id, String title, String icon)`
  Creates an action with an icon.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getIcon()`
  Returns the drawable resource name used for the action icon on Android, or null.
  `String`
  `getId()`
  Returns the action id.
  `String`
  `getTextInputButtonText()`
  Returns the label of the reply button for the inline text input, or null when the action has no text input.
  `String`
  `getTextInputPlaceholder()`
  Returns the placeholder text for the inline text input, or null when the action has no text input.
  `String`
  `getTitle()`
  Returns the button label.
  `boolean`
  `isTextInput()`
  Returns true if this action has an inline text input (quick reply).

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.

    The icon is a platform resource NAME, not a numeric id (Codename One has no numeric resource ids). On Android it is the name of a drawable bundled in the `native/android` folder (the build copies it into `res/drawable`), resolved at runtime by name; the file extension is optional and ignored. iOS notification action buttons do not display icons, so the value is ignored there.

    ###### Parameters

    - `id`: the action id reported back when the user taps the action

    - `title`: the button label

    - `icon`: the drawable resource name for the action (Android only)

- ## 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 drawable resource name used for the action icon on Android, or null. See `Action#Action(String, String, String)` for how it is resolved.

    ###### Returns

    the drawable resource name, 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