0

Need help to resolve a Fotoapparat library issue.

io.fotoapparat.exception.camera.CameraException: Failed to open camera with lens position: io.fotoapparat.characteristic.LensPosition$Back@31c3b8a2 and id: 0

When I open the first time It will work correctly. But after that, I click on other tabs and then open camera screen It will display a blank white screen. I am using viewPager for that.

How did you initialize FA?

 mCameraView = view.findViewById(R.id.camera);
 fotoapparat = Fotoapparat.with(getActivity())
            .into(mCameraView)
            .previewScaleType(ScaleType.CenterCrop)
            .logger(new Logger() {
                @Override
                public void log(String s) {
                    Log.e("Camera", s);
                }
                @Override
                public void recordMethod() {

                }
            })
            .cameraErrorCallback(new CameraErrorListener() {
                @Override
                public void onError(CameraException e) {
                    e.printStackTrace();
                    fotoapparat.stop();
                }
            })
            .build();

FA version: 2.5.0

Devices/APIs affected: 19,20,21,22

Devangi
  • 365
  • 2
  • 10
  • Other users marked your question for low quality and need for improvement. I re-worded/formatted your input to make it easier to read/understand. Please review my changes to ensure they reflect your intentions. But I think your question is still not answerable. **You** should [edit] your question now, to add missing details (see [mcve] ). Feel free to drop me a comment in case you have further questions or feedback for me. – GhostCat Oct 23 '18 at 10:11
  • Like: more of your stack trace! – GhostCat Oct 23 '18 at 10:11

0 Answers0