I’m trying to create a Compose app that will display a camera preview and, when a button is tapped, it will take a photo and pass it for further analysis.
What I have now is an app that correctly displays the preview continuously, but I can only take a photo once - the next one results in
Not bound to a valid Camera
. Looks like I don’t correctly bind the use cases to the camera, but I’m struggling because the context is not available everywhere.
I’ve found this example: https://developer.android.com/codelabs/camerax-getting-started#1 but it doesn’t use Compose. Are you aware of any Compose-based example that uses the preview and further photo processing?