FetchDeviceInfoAction

class FetchDeviceInfoAction(channelProvider: () -> AirshipChannel = { Airship.channel }, pushManagerProvider: () -> PushManager = { Airship.push }, contactProvider: () -> Contact = { Airship.contact }) : Action(source)

Action to fetch a map of device properties.

Accepted situations: all.

Accepted argument value - none.

Result value: JsonMap containing the device's channel ID, named user ID, push opt-in status, location enabled status, and tags. An example response as JSON:

{
"channel_id": "9c36e8c7-5a73-47c0-9716-99fd3d4197d5",
"push_opt_in": true,
"location_enabled": true,
"named_user": "cool_user",
"tags": ["tag1", "tag2, "tag3"]
}

Default Registration Names: DEFAULT_NAMES

Default Registration Predicate: only accepts Action.Situation.WEB_VIEW_INVOCATION and Action.Situation.MANUAL_INVOCATION

Constructors

Link copied to clipboard
constructor(channelProvider: () -> AirshipChannel = { Airship.channel }, pushManagerProvider: () -> PushManager = { Airship.push }, contactProvider: () -> Contact = { Airship.contact })

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Functions

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

Performs the action.

Inherited functions

Link copied to clipboard

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

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.

Link copied to clipboard

Determines which thread runs the action.