Sensorberg Smart Spaces SDK for Android / com.sensorberg.smartworkspace.sdk / SmartWorkspaceSdk / Builder

Builder

class Builder

Builder for the real Smart Workspace implementation. All parameters are required and can be found on the Smart Workspaces admin panel.

Typical implementation looks like:

    SmartWorkspaceSdk
        .Builder(context) // Android context
        .baseUrl(baseUrl) // base URL to the server
        .oauthId(oauthId) // oauth ID of the Android application on the server
        .certificate(certificate) // server public key certificate hash on the format: "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
        .build()

Constructors

<init>

Builder(context: Context)

Builder for the real Smart Workspace implementation. All parameters are required and can be found on the Smart Workspaces admin panel.

Functions

baseUrl

fun baseUrl(baseUrl: String): Builder

build

fun build(): SmartWorkspaceSdk

Validate the parameters and instantiate the SDK implementation. Applications should built the SDK only once and persist it on a singleton.

certificate

fun certificate(certificate: String): Builder

magnetoEnabled

fun magnetoEnabled(magnetoEnabled: Boolean): Builder

oauthId

fun oauthId(oauthId: String): Builder