BasePermissionManager

abstract class BasePermissionManager<P : Permission>(val permission: P, settings: BasePermissionManager.Settings, coroutineScope: CoroutineScope) : PermissionManager<P> , CoroutineScope

An abstract PermissionManager that ensures events wont be missed

Parameters

P

the type of Permission to manage

permission

the P managed by this manager

settings

the Settings to apply to this manager.

coroutineScope

the CoroutineScope of this manager.

Constructors

Link copied to clipboard
constructor(permission: P, settings: BasePermissionManager.Settings, coroutineScope: CoroutineScope)

Types

Link copied to clipboard
data class Settings(val logger: Logger = RestrictedLogger(RestrictedLogLevel.None))

Settings to configure a BasePermissionManager

Properties

Link copied to clipboard
Link copied to clipboard
open override val events: Flow<PermissionManager.Event>

A Flow of Event detected by the manager

Link copied to clipboard
override val permission: P

Functions

Link copied to clipboard
override fun requestPermission()

Starts to request the permission

Link copied to clipboard
override fun startMonitoring(interval: Duration)

Starts monitoring for changes to the permission.

Link copied to clipboard
override fun stopMonitoring()

Stops monitoring for changes to the permission.