-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Example that requests permissions from a composable #53
Comments
Thanks for the request! This would be a very useful example so I'll add this soon. In the meantime, if you need something sooner, here's a related discussion - https://kotlinlang.slack.com/archives/CJLTWPH7S/p1590597865122200 |
Hi @vinaygaba , I did something like this:
and then provide PermissionHandler as an ambient like so:
My idea was to be able to use it like:
The problem is when I get to the
Not really sure how to solve the issue. It seems to me that at the point of a I was wondering whether you've already implemented permissions and maybe have some idea on how to solve this or do it a different way? |
@dri94 I am aware of this gist by one of the developers on Compose that shows how they are thinking about permission handling - https://gist.github.com/objcode/775fe45127fd40f17932f672ee203f72#file-permissions-kt-L78 |
I think you tagged the wrong person but Thanks! It was the right call to ask about it here. Thank you very much. |
Oh my bad 🙈 |
Update: You should probably be using Accompanist for permission support in Compose - https://github.com/google/accompanist/tree/main/permissions |
I'd like to work on this issue, please assign it to me. @vinaygaba |
It is apparent how we could request permissions from the MainActivity. However what if we are several layers deep in our app, how would we request runtime permission (such as location)?
The text was updated successfully, but these errors were encountered: