Switchboard

Switchboard V3 API

Properties

Link copied to clipboard
val gson: Gson

Functions

Link copied to clipboard

Add an event listener to a Switchboard object

fun addEventListener(objectId: ObjectID, eventName: String, callback: (eventName: String, eventData: Any?) -> Unit): SwitchboardResult<ListenerID>

Add an event listener with a lambda callback

Link copied to clipboard
fun callAction(objectId: ObjectID, actionName: String, params: Map<String, Any> = emptyMap()): SwitchboardResult<String>

Calls an action on the object with the specified object ID.

Link copied to clipboard

Create a new engine from JSON configuration

Creates an engine with the given configuration.

Link copied to clipboard

Deinitializes the Switchboard SDK, releasing the resources it holds.

Link copied to clipboard

Destroys the engine with the given object ID, releasing its resources.

Link copied to clipboard
fun getValue(objectId: ObjectID, key: String): SwitchboardResult<Any?>

Get a property value from a Switchboard object

Link copied to clipboard
fun initialize(context: Context, appId: String, appSecret: String, extensions: Map<String, Any> = emptyMap()): SwitchboardResult<Unit>

Initialize the Switchboard SDK with configuration

Link copied to clipboard

Load an extension library using dlopen with RTLD_GLOBAL

Link copied to clipboard

Remove an event listener

Link copied to clipboard
fun setValue(objectId: ObjectID, key: String, value: Any): SwitchboardResult<Unit>

Set a property value on a Switchboard object