sendAction

abstract fun sendAction(messageName: MessageName, payload: Payload, stateLevel: StateLevel = StateLevel.UNSUPPORTED, serverActionMode: ServerActionMode = ServerActionMode.FOREGROUND): MessageId

simple ServerAction example messageName: SERVER_ACTION payload: {"action_id": "GET_STREAM", "parameters": {"content_id": "111111"}}

runApp example messageName: RUN_APP payload: {"action_id": "run_app, "app_info": {"projectId":"5633938a-5ff3-49c9-ba7d-fe2a9944de78"}, "parameters": {}}

Return

generated message ID that can be used to track response, logs and etc

Parameters

serverActionMode

need for backend filtering. On versions lower than 2 parameter will be ignored.

stateLevel

defines the amount of information gathered by the system.


@RequiresPermission(value = "ru.sberdevices.permission.CROSS_APP_ACTION")
abstract fun sendAction(messageName: MessageName, payload: Payload, androidApplicationID: String, stateLevel: StateLevel = StateLevel.UNSUPPORTED, serverActionMode: ServerActionMode = ServerActionMode.FOREGROUND): MessageId

Send server_action with source app androidApplicationID For internal use only.

Return

generated message ID that can be used to track response, logs and etc

Parameters

serverActionMode

need for backend filtering. On versions lower than 2 parameter will be ignored.

stateLevel

defines the amount of information gathered by the system.

Throws

if trying to call method without having permission.