CameraFragment icon indicating copy to clipboard operation
CameraFragment copied to clipboard

Camera capture not happening.

Open sreekanth100khere opened this issue 5 years ago • 0 comments

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.

sreekanth100khere avatar Mar 14 '19 06:03 sreekanth100khere