Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.datasync / DatasyncNode / set
set
fun set(at: DatasyncTime = DatasyncTime.Now, value: Any?, callback: WebcomDoneCallback? = null): Unit
Writes some data at this data node asynchronously.
The requested write operation is done asynchronously:
- with the DatasyncTime.Now policy, the operation is triggered immediately and the passed callback is called
as soon as the operation is acknowledged by the Webcom back end,
- with the DatasyncTime.AtNextDisconnection policy, the operation will be triggered only on the next network
disconnection with the Webcom back end, and the passed callback is called as soon as the Webcom back end
has registered the request for this delayed operation. This policy is especially intended to manage users'
presence status.
The value to set may be of any kind, it is serialized to a tree-like representation supported by the Webcom
database.
fun set(value: Any?, callback: WebcomDoneCallback? = null): Unit