Closed ivan200 closed 3 years ago
Hello @ivan200
First of all, thank you for using this library.
Secondly, I didn't understand the context behind your replacement of the cameraProvider.bindToLifeCycle
method. Could you please explain it as to why are you trying to replace this one?
And the reason you're not able to take a picture or even a video, because without the use cases such as imageCapture and videoCapture you're not providing any config to the preview. Without this configuration, it's just a preview, nothing else.
I'll be more of help only if you provide me with me context for this move of yours.
Thank you.
Secondly, I didn't understand the context behind your replacement of the cameraProvider.bindToLifeCycle method. Could you please explain it as to why are you trying to replace this one?
i just tried to make your lib working and not crash camera. But simple replacement is not working, and i was lazy so i just write here and hope you can fix your lib.
Okay, it is because of the CameraX APIs, the device you're using might not be supported, you can try providing imageCaputure only
replace
cameraProvider.bindToLifecycle(this, cameraSelector, preview, imageCapture, videoCapture)
with
cameraProvider.bindToLifecycle(this, cameraSelector, preview, imageCapture)
This is just an assumption, as I'm not able to reproduce this issue. Also, you can try it on some other device and emulator. Let me know how that goes.
Hi can u use only camera without gallery?
Hello, @akshay-nayak , no you cannot use it without the gallery, as this is supposed to replicate the WhatsApp Image picker behavior. But maybe I can add support for it. I'll look into it over the weekend, and will let you know.
Device: meizu 15 logcat:
if i replace cameraProvider.bindToLifecycle(this, cameraSelector, preview, imageCapture, videoCapture) to cameraProvider.bindToLifecycle(this, cameraSelector, preview) then preview is started, but i cant take picture