Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Camera capture not happening. #113

Open
sreekanth100khere opened this issue Mar 14, 2019 · 0 comments
Open

Camera capture not happening. #113

sreekanth100khere opened this issue Mar 14, 2019 · 0 comments

Comments

@sreekanth100khere
Copy link

sreekanth100khere commented Mar 14, 2019

While the device is moving if we click capture button, then the camera capture not happening.
Mostly observed in OS version pie, Handsets observed is Poco and OnePlus. But if we keep the device to upside down with camera facing ground or cover with the hand the capture happens. but we get a black image.

@OverRide
public void takePhoto(File photoFile, CameraPhotoListener cameraPhotoListener, CameraFragmentResultListener callback) {
this.outputPath = photoFile;
this.cameraPhotoListener = cameraPhotoListener;
this.callback = callback;

    backgroundHandler.post(new Runnable() {
        @Override
        public void run() {
           
            lockFocus();
        }
    });

}

lockFocus() doesnot get called.
final CameraFragmentApi cameraFragment = getCameraFragment();

    if (cameraFragment != null) {
        cameraFragment.takePhotoOrCaptureVideo(new CameraFragmentResultAdapter() {
            @Override
            public void onVideoRecorded (String filePath) {
           }

            @Override
            public void onPhotoTaken (byte[] bytes, String filePath) {
            }

onPhotoTaken not getting called.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant