Lilly
09/03/2021, 12:19 PMval requestPermissionLauncher = rememberLauncherForActivityResult(
ActivityResultContracts.RequestPermission()
) { isGranted ->
...
}
and requestPermissionLauncher.launch(permission)
. I have discovered that requestPermissionLauncher.launch(permission)
is responsible for opening the "android permission prompt" false
without waiting for a user action. When I click "Allow" btn the callback is triggered with true
. Is the first run with false inteded? Do we have to suspend here and wait for a user action somehow? I would expect that the callback is only triggered when a button of the prompt is clciked.Felix Schütz
09/03/2021, 12:25 PMLaunchedEffect
?Lilly
09/03/2021, 12:26 PMonClick
callback, so it's not affected by recomposition.Felix Schütz
09/03/2021, 12:31 PMLilly
09/03/2021, 12:32 PMIan Lake
09/03/2021, 2:53 PMLilly
09/04/2021, 8:32 PM