André Thiele
02/09/2021, 7:39 PMBrian Dupuis
02/09/2021, 7:46 PMRequestMultiplePermissions
contract you’ll get a Map<String,Boolean>
rather than a Boolean
in the result that you can then check all of the permissions to see which were granted and which were not.Ian Lake
02/09/2021, 9:00 PMregisterForActivityResult()
multiple times with different callback logic for eachBrian Dupuis
02/09/2021, 9:00 PMIan Lake
02/09/2021, 9:02 PMregisterForActivityResult()
Kotlin extension that lets you define the input at register time (so you tie the input with the callback together): https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary?hl=en#registerforactivityresult_1Ian Lake
02/09/2021, 9:05 PMval requestCameraPermissionLauncher = registerForActivityResult(
RequestPermission(),
Manifest.permission.CAMERA
) { isGranted: Boolean ->
}
// now you can just requestCameraPermissionLauncher.launch()
// without any permission here
Brian Dupuis
02/09/2021, 9:06 PMIan Lake
02/09/2021, 9:22 PMIan Lake
02/09/2021, 9:22 PMBrian Dupuis
02/09/2021, 10:36 PMAndré Thiele
02/10/2021, 8:37 AM