Compose makes calling system UI feel like calling a function. The catch is that the callee can outlive the caller, and your process can die in the middle of the call.
Why this API deserves a senior-level look
Most Compose code you write is a pure function of state. rememberLauncherForActivityResult is one of the few places where a composable negotiates with something outside your process: the camera app, the system photo picker, a permission dialog, a billing sheet. The call looks synchronous in your code, but the system is free to destroy your activity, or your whole process, before the answer comes back.
The API handles that surprisingly well, and it still has sharp edges that only show up on real devices, in the hands of real users, under memory pressure.…