ClipboardAction

class ClipboardAction(contextProvider: () -> Context = { Airship.application }) : Action(source)

An action that adds text to the clipboard.

Accepted situations: Action.Situation.PUSH_OPENED, Action.Situation.WEB_VIEW_INVOCATION, Action.Situation.MANUAL_INVOCATION, Action.Situation.BACKGROUND_NOTIFICATION_ACTION_BUTTON, Action.Situation.AUTOMATION, and Action.Situation.FOREGROUND_NOTIFICATION_ACTION_BUTTON.

Accepted argument value - A string with the clipboard text or a map with:

  • .LABEL_KEY: String, Optional

  • .TEXT_KEY: String, Required

Result value: The arguments value.

Default Registration Name: DEFAULT_NAMES

Constructors

Link copied to clipboard
constructor(contextProvider: () -> Context = { Airship.application })

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun acceptsArguments(arguments: ActionArguments): Boolean

Called before an action is performed to determine if the the action can accept the arguments.

Link copied to clipboard
open override fun perform(arguments: ActionArguments): ActionResult

Performs the action.

Link copied to clipboard
open override fun shouldRunOnMainThread(): Boolean

Determines which thread runs the action.

Inherited functions

Link copied to clipboard
open fun onFinish(arguments: ActionArguments, result: ActionResult)

Called after the action performs.

Link copied to clipboard
open fun onStart(arguments: ActionArguments)

Called before an action is performed.

Link copied to clipboard

Performs the action, with pre/post execution calls, if it accepts the provided arguments.