check Permissions
Checks and requests runtime permissions with a rationale message and custom dialog options.
This is the most configurable overload. It resolves the Permission types to their underlying Android manifest permissions (e.g., Permission.audio maps to RECORD_AUDIO and MODIFY_AUDIO_SETTINGS; Permission.bluetooth maps to BLUETOOTH_CONNECT on Android 12+). If any permissions have not been granted, the user is prompted with a system dialog. The rationale message is shown if the user previously denied the permission, and options allows customizing the settings dialog text if the user selects "Don't ask again".
Code Example:
val options = Permissions.Options()
.setSettingsDialogTitle("Permission Required")
.setSettingsDialogMessage("Please grant permissions in Settings")
VideoSDK.checkPermissions(context,
listOf(Permission.audio, Permission.video),
"Camera and microphone are needed for video calls",
options,
object : PermissionHandler() {
override fun onGranted() {
// All permissions granted, proceed with meeting
}
}
)
Parameters
Application or activity context.
List of Permission types to request (audio, video, bluetooth).
(Optional) A message explaining why the permissions are needed, shown to the user if they previously denied a permission.
(Optional) Custom Permissions.Options for dialog title, message, and behavior when the user has selected "Don't ask again".
Callback handler for permission results. onGranted() is called when all requested permissions are granted.
See also
Checks and requests runtime permissions required by the SDK, without a rationale message or custom dialog options.
This is a convenience overload that delegates to checkPermissions with null rationale and default options. See that overload for full parameter documentation and details on how permissions are resolved.
Code Example:
VideoSDK.checkPermissions(context,
listOf(Permission.audio, Permission.video),
object : PermissionHandler() {
override fun onGranted() {
// Permissions granted, proceed with meeting
}
}
)
Parameters
Application or activity context.
List of Permission types to request.
Callback handler for permission results.
See also
Checks and requests permissions with a rationale message.
Code Example:
VideoSDK.checkPermissions(context,
listOf(Permission.audio, Permission.video),
"Camera and microphone are needed for video calls",
object : PermissionHandler() {
override fun onGranted() {
// Permissions granted, proceed
}
}
)
Parameters
A message explaining why the permissions are needed, shown to the user.
See also
Checks and requests permissions with custom options.
Code Example:
val options = Permissions.Options()
.setSettingsDialogTitle("Permission Required")
VideoSDK.checkPermissions(context,
listOf(Permission.audio),
options, permissionHandler
)
Parameters
Custom Permissions.Options for dialog text and behavior.