ManifestPermissionRequest

class ManifestPermissionRequest(context: Context, permissions: Array<out String>) : BasePermissionRequest

Implementation of BasePermissionRequest that checks the permissions below Android M. To check if a permission is granted or not, the only information needed is its presence in the manifest.

Constructors

ManifestPermissionRequest
Link copied to clipboard
fun ManifestPermissionRequest(context: Context, permissions: Array<out String>)

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
open override 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
open override fun send()

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