LandingPageAction

class LandingPageAction(scheduler: suspend (AutomationSchedule) -> Unit, allowListChecker: (String) -> Boolean, scheduleExtender: ScheduleExtender? = null, borderRadius: Float, clock: Clock = Clock.DEFAULT_CLOCK) : Action

Schedules a landing page to display ASAP.

Accepted situations: Action.SITUATION_PUSH_OPENED, Action.SITUATION_WEB_VIEW_INVOCATION, Action.SITUATION_MANUAL_INVOCATION, Action.SITUATION_AUTOMATION, and Action.SITUATION_FOREGROUND_NOTIFICATION_ACTION_BUTTON.

Accepted argument value types: URL defined as either a String or a Map containing the key "url" that defines the URL, an optional "width", "height" in dps as an int or "fill" string, an optional "aspect_lock" option as a boolean.

The aspect_lock option guarantees that if the message does not fit, it will be resized at the same aspect ratio defined by the provided width and height parameters.

Default Registration Names: ^p, landing_page_action

Constructors

Link copied to clipboard
constructor(borderRadius: Float = DEFAULT_BORDER_RADIUS, scheduleExtender: ScheduleExtender? = null)

Default constructor

constructor(scheduler: suspend (AutomationSchedule) -> Unit, allowListChecker: (String) -> Boolean, scheduleExtender: ScheduleExtender? = null, borderRadius: Float, clock: Clock = Clock.DEFAULT_CLOCK)

Types

Link copied to clipboard
object Companion

Functions

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

Checks if the situation is not Action.SITUATION_PUSH_RECEIVED or Action.SITUATION_BACKGROUND_NOTIFICATION_ACTION_BUTTON

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

Inherited functions

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