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
206 stars 18 forks source link

I cant capture an image #95

Open YoussefHachicha opened 1 month ago

YoussefHachicha commented 1 month 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 1 month 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.