STWAccountManagerKt

object STWAccountManagerKt : ObservableApi

Functions

Link copied to clipboard
fun getAccountConnectionState(): String

Gets the current connection state with the backend.

Link copied to clipboard
fun getAllowedFeaturesAsFlow(    featureName: String,     coroutineScope: CoroutineScope,     lifecycleOwner: LifecycleOwner): StateFlow<Boolean>
fun getAllowedFeaturesAsFlow(    featureName: String,     coroutineScope: CoroutineScope,     getDisposable: (disposable: Disposable) -> Unit): StateFlow<Boolean>

Call this method to check whether the account feature is allowed or not.

Link copied to clipboard
fun getAppName(context: Context, defaultName: String): String

Call this method to get the app name either configured in the BE admin interface or default if not configured

Link copied to clipboard
fun getBackendVersion(context: Context): String?

Call this function to retrieve the backend version that the app is connected to. E.g : 2.4.12.26 that represents Major.minor.patch while

Link copied to clipboard
fun isIconPerRoleFeatureAllowed(context: Context): Boolean

Check whether the IconPerRole feature is enabled or not.

Link copied to clipboard
fun isSettingsModificationAllowed(context: Context): Boolean

Call this method to check whether the settings from the file can be modified by the client or not

Link copied to clipboard
fun isUserAvailabilityAllowed(context: Context): Boolean

Whether the subscriber user availability feature is enabled in backend or not

Inherited functions

Link copied to clipboard
fun subscribe(listener: STWEventListener<STWEvent>): Disposable
Link copied to clipboard
fun subscribeFor(eventTypes: Array<Class<out STWEvent>>, listener: STWEventListener<STWEvent>): Disposable
fun subscribeFor(eventTypes: Array<String>, listener: STWEventListener<STWEvent>): Disposable

Subscribes to the specific eventTypes of the client.

fun subscribeFor(    lifecycleOwner: LifecycleOwner,     eventTypes: Array<Class<out STWEvent>>,     listener: STWEventListener<STWEvent>): Disposable
fun subscribeFor(    lifecycleOwner: LifecycleOwner,     eventTypes: Array<String>,     listener: STWEventListener<STWEvent>): Disposable

Subscribes to the specific eventTypes of the client, in the lifecycle of lifecycleOwner.

fun subscribeFor(    eventTypes: Array<String>,     filter: (STWEvent) -> Boolean,     listener: STWEventListener<STWEvent>): Disposable

Subscribes to the specific eventTypes of the client with additional filter.

fun subscribeFor(    lifecycleOwner: LifecycleOwner,     eventTypes: Array<String>,     filter: (STWEvent) -> Boolean,     listener: STWEventListener<STWEvent>): Disposable

Subscribes to the specific eventTypes of the client with additional filter, in the lifecycle of lifecycleOwner.

Link copied to clipboard
fun <T : STWEvent> subscribeForSingle(eventType: Class<T>, listener: STWEventListener<T>): Disposable
fun subscribeForSingle(eventType: String, listener: STWEventListener<STWEvent>): Disposable

Subscribes for the next event with the given eventType.

fun subscribeForSingle(    eventType: String,     filter: (STWEvent) -> Boolean,     listener: STWEventListener<STWEvent>): Disposable

Subscribes for the next event with the given eventType with additional filter.