HmsSessionStore

Session Store that only uses asynchronous methods to get and set data.

Functions

Link copied to clipboard
fun addKeyChangeListener(forKeys: List<String>, keyChangeListener: HMSKeyChangeListener, hmsActionResultListener: HMSActionResultListener)
Link copied to clipboard
fun get(key: String = DEFAULT_SESSION_METADATA_KEY, hmsSessionMetadataListener: HMSSessionMetadataListener)

Gets a value for the given key from the store. Note: If a local peer sets a value and it didn't reach the store, the local value will not be updated either.

Link copied to clipboard
fun removeKeyChangeListener(listener: HMSKeyChangeListener, hmsActionResultListener: HMSActionResultListener? = null): Job
Link copied to clipboard
fun set(data: Any?, key: String, hmsActionResultListener: HMSActionResultListener)

Set a value remotely and then to the local store. Note: If the hmsActionResultListener fails to set, the local value will not be updated either.