requestBluetoothPermission

fun requestBluetoothPermission(onGranted: () -> Unit, onDenied: () -> Unit)

Requests Bluetooth permission for the application.

This method initiates a permission request flow. If the permission is already granted, it invokes the onGranted callback immediately. Otherwise, it starts the PermissionActivity to request the permission from the user.

Note: Ensure to add the following permissions in the app's manifest file:

Parameters

onGranted

Callback to be invoked if the permission is granted.

onDenied

Callback to be invoked if the permission is denied.