CompatPermissionRequestBuilder

Implementation of BasePermissionRequestBuilder that creates a different request depending on the device's API version.

Since Android M, this builder creates a RuntimePermissionRequest that uses the RuntimePermissionHandler provided by this builder. Below Android M, this builder creates a ManifestPermissionRequest.

Functions

build
Link copied to clipboard
open override fun build(): PermissionRequest

Build the PermissionRequest with all the configurations set. It will also assigns the default values and throw some exceptions if the configuration of this builder isn't a valid one.

permissions
Link copied to clipboard
open override fun permissions(firstPermission: String, vararg otherPermissions: String): PermissionRequestBuilder

Sets the permissions that must be requested.

runtimeHandlerProvider
Link copied to clipboard
open override fun runtimeHandlerProvider(runtimeHandlerProvider: RuntimePermissionHandlerProvider): PermissionRequestBuilder

Sets the RuntimePermissionHandlerProvider used to provide a RuntimePermissionHandler.