CameraView icon indicating copy to clipboard operation
CameraView copied to clipboard

Cameraoptions not set after onCameraAvailable super call

Open MaxMaes opened this issue 8 years ago • 1 comments

  • [x] I am using the latest version
  • [ ] I can reproduce the bug in the demo app, and if not...
  • [ ] I have tried to reproduce the bug in the demo app

Detailed steps to reproduce the issue:

  1. In activity onStart, add a CameraListener which implements onCameraOpened
  2. In the onCameraOpened function, first call super.onCameraOpened
  3. Next, try to access cameraView.cameraOptions.supportedFlash

Expected behavior:

Should contain an array of supported flash modes as we've received the CameraOptions from the camera and it should have them set internally as well.

Actual behavior:

SOMETIMES crashes with a nullpointer on cameraOptions.

When I put some logs before the accessing of cameraView.cameraOptions, i didn't manage to crash it.

MaxMaes avatar Feb 22 '18 11:02 MaxMaes

I don't know why your cameraOptions object would be null, but looks like an application issue. I'm closing becauase there are lots of issues to review, feel free to reopen with more info if you have

natario1 avatar Feb 27 '18 13:02 natario1