before I make something (possibly ugly) myself, is...
# compose
k
before I make something (possibly ugly) myself, is there something like a WithActivity {} or WithApplication {} Compose functions to provide the current activity or application context (which is sometimes needed for low level android calls). I've looked through https://developer.android.com/reference/kotlin/androidx/compose but so far no luck.
z
I wonder if context ambient would do the job for your case?
l
yeah, do you need Context or Activity?
ContextAmbient.current
will get you the former
❤️ 2
we don’t currently have an Activity ambient, and i’m not sure if we want to add one
but you can add one yourself pretty easily
k
Ohh - ContextAmbient is perfect for me. thanks! btw - is there any top level meta document on using Compose or at this point is it basically the tutorial + the javadocs?
l
tutorials and docs are pretty much the only official things we have at the moment, sorry
APIs are changing pretty dramatically still at this point so we don’t want to waste too much effort documenting things in ways that will be outdated
👍 2
🙏🏼 1
k
gotcha. no worries! I'll try not to be too pesty with questions tho.
l
no worries! ask away! that’s partially why this slack channel is here
k
oh yah - I bet it is a goldmine of 'oh, here's what we'll need to document or here's usecases that actual users are trying'
l
yeah it is