BasePermissionRequest

abstract class BasePermissionRequest : PermissionRequest

Base implementation of PermissionRequest that implements all the listeners' logic that must be the same to all its subclasses.

Constructors

BasePermissionRequest
Link copied to clipboard
fun BasePermissionRequest()

Functions

addListener
Link copied to clipboard
open override fun addListener(listener: PermissionRequest.Listener)

Adds a Listener which will be notified when the permissions request sent with send ends.

checkStatus
Link copied to clipboard
abstract fun checkStatus(): List<PermissionStatus>

Checks the status of permissions of this request without sending it. Below API 23, this method and send should have the same behavior since the permissions status can be checked without sending a runtime request. Below API 23, the possible status are:

removeAllListeners
Link copied to clipboard
open override fun removeAllListeners()

Removes all the listeners added to this request.

removeListener
Link copied to clipboard
open override fun removeListener(listener: PermissionRequest.Listener)

Removes a Listener added with addListener which should not be notified anymore.

send
Link copied to clipboard
abstract fun send()

Sends the PermissionRequest and performs the checks on its status. The result will be returned to the attached listeners.

Inheritors

ManifestPermissionRequest
Link copied to clipboard
RuntimePermissionRequest
Link copied to clipboard