PermissionHandler

abstract class PermissionHandler

Reports the outcome of VideoSDK.checkPermissions. Each request ends in exactly one of onGranted, onDenied or onJustBlocked, unless onBlocked returns true — then that call is the last.

onGranted runs on the calling thread, before checkPermissions returns, when every permission was already held; otherwise every callback runs on the main thread once the user has answered.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun onBlocked(context: Context, blockedList: ArrayList<Permission>): Boolean

The user had already refused these with "don't ask again" before this request, so no dialog can be shown any more — only the app's settings screen will change them.

Link copied to clipboard
open fun onDenied(context: Context, deniedPermissions: ArrayList<Permission>)

Refused this time, with the system dialog still available: prompt again later with an explanation rather than sending the user to Settings.

Link copied to clipboard
abstract fun onGranted()

Every requested permission is held and the SDK can open the devices.

Link copied to clipboard
open fun onJustBlocked(context: Context, justBlockedList: ArrayList<Permission>, deniedPermissions: ArrayList<Permission>)

The user ticked "don't ask again" during this request. The default implementation forwards to onDenied; override it to explain that a settings visit is now required.