QRCodeReaderView icon indicating copy to clipboard operation
QRCodeReaderView copied to clipboard

Stoping camera does not work

Open busylee999 opened this issue 7 years ago • 4 comments

Force stoping camera does not working for me. If we stop camera and does not pause activity, CameraManager.onSurfaceChanged callback still fires and CameraManager startPreview method is being called

busylee999 avatar Aug 25 '17 12:08 busylee999

Can you provide more info about what do you want to achieve?

dlazaro66 avatar Oct 14 '17 12:10 dlazaro66

In fact as a result this behavior I suppose, leads to crash. The case you can face crash:

  1. Open you activity with View installed
  2. Start preview
  3. Open camera app
  4. Reopen you activity

Result will be a crash, I think, because lib does not release camera. I fixed this bug in my local copy of library.

busylee999 avatar Oct 17 '17 13:10 busylee999

Actually I've noticed this problem too (the original one of the post). once the activity start in OnResume i call stopCamera() but after that when the CameraManager.onSurfaceChanged is called the QRCodeReaderView recalls your internal startPreview() method, which turns on the camera.

MajedDH avatar Nov 16 '17 11:11 MajedDH

How did you solved that? :(

amandahla avatar Nov 28 '17 14:11 amandahla