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

DatasyncService

class DatasyncService : WebcomService

The WebcomService that makes it possible to interact in real time with the data of a Webcom application.

This service mainly provides ways to get/set/update the data and to subscribe to them in order to be notified in real time when they change. Instances of DatasyncService must be built using the WebcomApplication.service method.

Properties

isForcedOnline

var isForcedOnline: Boolean

Indicates whether the DatasyncService tries to establish connectivity with the Webcom back end.

Functions

createManager

fun createManager(): DatasyncManager

Asks the DatasyncService to create a new DatasyncManager instance.

isPresent

fun isPresent(value: DatasyncValuable): Boolean

Indicates whether a value previously set by the startPublishingMyPresence method means that a user is present.

persist

fun persist(): Unit

Saves the current data stored in the local cache into the local storage of the device.

resume

fun resume(): Unit

startPublishingMyPresence

fun startPublishingMyPresence(path: String): Unit

Starts maintaining a value at a given path that indicates in real time whether the user of the underlying WebcomApplication is connected and authenticated.

stopPublishingMyPresence

fun stopPublishingMyPresence(): Unit

Stops maintaining the indicator of the user presence, previously started by the startPublishingMyPresence method.