-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
As stated in title.
Compile SDK: 33
Android version: 13
Image: https://i.imgur.com/FwdLvgh.png
CoroutineScope(Default).launch {
val result = requestPermissionsAsync(
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION
)
when (result) {
is PermissionResult.Granted -> {Log.e("Activity", "GRANTED") } // woohoo, all requested permissions granted
is PermissionResult.Denied.JustDenied -> {Log.e("Activity", "JUST DENIED") } // at least one permission was denied, maybe we forgot to register it in the AndroidManifest?
is PermissionResult.Denied.NeedsRationale -> {Log.e("Activity", "NEEDS") } // user clicked Deny, let's show a rationale
is PermissionResult.Denied.DeniedPermanently -> { Log.e("Activity", "DENIED PERM")} // Android System won't show Permission dialog anymore, let's tell the user we can't proceed
is PermissionResult.Cancelled -> {Log.e("Activity", "CANCELLED") } // interaction was interrupted
}
}
Metadata
Metadata
Assignees
Labels
No labels