onseok / peekaboo

🌄 Kotlin Multiplatform library for Compose Multiplatform, designed for seamless integration of an image picker feature in iOS and Android applications.
Apache License 2.0
241 stars 20 forks source link

I cant capture an image #95

Open YoussefHachicha opened 3 months ago

YoussefHachicha commented 3 months ago

the PeekabooCamera is just a plain camera and it doesn't provide a way to capture an image val state = rememberPeekabooCameraState(onCapture = { / Handle captured images / }) PeekabooCamera( state = state, modifier = Modifier .fillMaxSize() .border( 1.dp, Color.Red ), permissionDeniedContent = { // Custom UI content for permission denied scenario }, )

vshkl commented 3 months ago

@YoussefHachicha, you need to use PeekabooCameraState. There is a capture() method in there. Please, have a look at the sample app. You can find how to trigger photo capturing there.