Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2 / WebcomApplication

WebcomApplication

class WebcomApplication

Represents a Webcom application.

It is the base object from which you can get a WebcomService (using the service method). The preferred way to create a WebcomApplication instance is to use one of the withAsset or withConfiguration static methods.

Constructors

<init>

WebcomApplication(properties: Properties)

Builds a WebcomApplication instance reading settings from Java properties.

WebcomApplication(assetName: String = defaultAssetName)

Builds a WebcomApplication instance reading settings from an Android asset file named assetName.

WebcomApplication(configuration: WebcomConfiguration)

Low-level constructor for the WebcomApplication class.

Functions

service

fun <R : WebcomService> service(): R

Gets the instance of a given WebcomService associated with this WebcomApplication instance.

Companion Object Properties

default

val default: WebcomApplication

Gets the default WebcomApplication instance, i.e. the one built from the "webcom.properties" asset file.

Companion Object Functions

withAsset

fun withAsset(name: String = defaultAssetName, done: WebcomResultCallback<WebcomApplication>): Unit

Ensures the Webcom SDK is properly initialized and passes a WebcomApplication instance built from an Android asset file named name to the done code block.

withConfiguration

fun withConfiguration(configuration: WebcomConfiguration, done: (WebcomApplication) -> Unit): Unit

Ensures the Webcom SDK is properly initialized and passes a WebcomApplication instance built from a Webcom configuration to the done code block.

withProperties

fun withProperties(properties: Properties, done: (WebcomResult<WebcomApplication>) -> Unit): Unit

Ensures the Webcom SDK is properly initialized and passes a WebcomApplication instance built from Java properties to the done code block.