@Ian Lake Yupp, sorry for the vagueness of the description.
I’ve seen the gist and I’m currently using it. My specific issue is, that I’m trying to call a composable function from a non-composable (
onClick: () -> Unit
)
nrobi
12/03/2020, 3:28 PM
So more specifically I’m looking for a way to do this:
@Composable
fun GetImage(callback: (Uri) -> Unit){}
Without the overhead of having a state flag or some similar implementation
i
Ian Lake
12/03/2020, 4:44 PM
That's not something you can do with Activity Results - your app can (and will, particularly when calling the camera on any medium/low ram device) get kicked out of memory, etc. when the other activity comes up and before your result comes back
Ian Lake
12/03/2020, 4:44 PM
So no callback based approach will ever be resilient enough to work