requestBackgroundLocationPermission

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

Requests the background location permission. Before requesting ACCESS_BACKGROUND_LOCATION, ensure ACCESS_FINE_LOCATION is already granted, use hasLocationPermission and requestLocationPermission()

Note: Make sure to add the following permission in your AndroidManifest.xml:

Parameters

onGranted

Callback invoked when the permission is granted

onDenied

Callback invoked when the permission is denied