As we are getting very close to Compose 1.0 I'm ve...
# compose
l
As we are getting very close to Compose 1.0 I'm very surprised there is no documentation or even samples available to show how to use Permission in a fully Compose app. Is this something that will be available later on ?
👀 2
j
https://gist.github.com/adamp/be8cb9c26bb9d198873f9d04d45c9355 It’s a bit outdated now but this is what we use
l
I'm aware of this gist, but as you said it's outdated and not updated as it's done for Compose Samples and the official documentation.
i
1
That's the same API you'd use for permission requests as per the Permissions docs: https://developer.android.com/training/permissions/requesting#allow-system-manage-request-code
So I think what you're asking for is a sample that specifically shows
rememberLauncherForActivityResult()
with the
RequestPermission
contract?
a
We could offer some other quality of life wrappers around this + reflecting the current permission state the way the gist does but that would be post-1.0
l
We have an example of the 
rememberLauncherForActivityResult
 API in the docs: https://developer.android.com/reference/kotlin/androidx/activity/compose/package-summary#rememberlauncherforactivityresult
Ah thanks 👍 I'm sorry I didn't saw it
So I think what you're asking for is a sample that specifically shows 
rememberLauncherForActivityResult()
 with the 
RequestPermission
 contract?
That would be a nice to have indeed. For instance, inside the Crane sample we could have the permission to request user location in the mapView.
We could offer some other quality of life wrappers around this + reflecting the current permission state the way the gist does but that would be post-1.0
Ok thanks for your replies 👍