https://kotlinlang.org logo
#compose
Title
# compose
c

Chris Fillmore

05/16/2022, 6:50 PM
I assume I’m not the only one here using Chrome Custom Tabs (whether directly or via e.g. AppAuth). So how are you handling UI state in between the time when a button is clicked, and the time when the browser opens? On observation I see that state changes aren’t propagated before the the browser opens, so if I try to, for example, respond to the click event by showing a loading spinner, the spinner doesn’t actually show up after the click. It takes a second (or fraction of) before it shows up, and then is immediately hidden by the browser.
The only way it looks smooth is if you invoke
ActivityResultLauncher.launch()
in an Effect
Which seems dodgy
So to be clear I assume this applies generally to launching any Activity, not just Chrome Custom Tabs. I’ve just felt it with CCT acutely
6 Views