-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #64
Comments
Hello, @kwesiamartey can you provide error logs in here? |
Hello, I am a developer from China. I can only use Google Translate to communicate with you. I am very sorry for this. |
Hello there, I encountered same problem. I think the issue here is due to permission handling - when I manually enable Camera permission in application settings, everything works fine. Without manual grant of Camera permission for the application, the code below just prints a message to the console and no camera view is displayed, nor is the user prompted to grant the permission. Tested on: Emulator with Android API 34 @Composable
@Preview
fun App() {
MaterialTheme {
Column(modifier = Modifier.fillMaxSize()) {
Text("Some text")
MyScreen()
}
}
}
@Composable
fun MyScreen() {
val state = rememberPeekabooCameraState(
onCapture = { /* Handle captured images */ },
)
PeekabooCamera(
state = state,
modifier = Modifier.fillMaxSize(),
permissionDeniedContent = {
println("\uD83C\uDF44 Permission failed")
},
)
}
Logs:
|
this doesn't work on android 11 and above
Doesn't work on all devices
The text was updated successfully, but these errors were encountered: