ContactsPermissionStateRepo

class ContactsPermissionStateRepo(contactsPermission: ContactsPermission, builder: BaseContactsPermissionManagerBuilder, monitoringInterval: Duration = defaultMonitoringInterval, settings: BasePermissionManager.Settings = BasePermissionManager.Settings(), coroutineContext: CoroutineContext) : PermissionStateRepo<ContactsPermission>

A PermissionStateRepo for ContactsPermission

Parameters

contactsPermission

the ContactsPermission to manage.

builder

The ContactsPermissionManagerBuilder for creating the ContactsPermissionManager associated with the permission

monitoringInterval

the Duration after which the system should poll for changes to the permission if automatic detection is impossible.

settings

the BasePermissionManager.Settings used by the ContactsPermissionManager created by the builder

coroutineContext

The CoroutineContext to run the state machine on.

Constructors

Link copied to clipboard
constructor(contactsPermission: ContactsPermission, builder: BaseContactsPermissionManagerBuilder, monitoringInterval: Duration = defaultMonitoringInterval, settings: BasePermissionManager.Settings = BasePermissionManager.Settings(), coroutineContext: CoroutineContext)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val lazyMutableFlow: Lazy<MutableStateFlow<PermissionState<ContactsPermission>>>
Link copied to clipboard
open override val stateFlow: StateFlow<PermissionState<ContactsPermission>>
Link copied to clipboard
val subscriptionCount: StateFlow<Int>

Functions

Link copied to clipboard
open suspend override fun collect(collector: FlowCollector<PermissionState<ContactsPermission>>): Nothing
Link copied to clipboard
open suspend override fun firstCollection()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <K : PermissionState<ContactsPermission>> launchTakeAndChangeState(context: CoroutineContext, remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PermissionState<ContactsPermission>): Job
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun <Result> useState(action: suspend (PermissionState<ContactsPermission>) -> Result): Result