Closed Robrowski closed 9 years ago
https://github.com/pikanji/CameraPreviewSample/tree/master/src/net/pikanji/camerapreviewsample
This is the same repository I used when for switching to dynamic image preview sizing, It's possible I didn't get everything quite right.
If this does not work, I bet we could go back to the version before dynamic previewing, since I started to notice a similar bug after implementing it, but it wasn't as consistent as this one. I would sometimes crash when after clicking a snap to go to snapview and then crash when going back to the list view.
its exactly that you didn't get all 100% of it right. I can explain later
Camera control stuff is fixed.
Just need to fix the size of the preview
Circumstances:
What I know is happening:
Why I haven't fixed it:
The solution is SUPPOSED to be releasing the camera in the "onPause" function (according to API), but the problem is onPause gets called other times too. Releasing effectively kills the mCamera object. Therefore, the camera gets RELEASED and gone, even though the surface view will be relying on that later. EX. turning your screen on then off freezes the camera.
If we can somehow restart/reinstantiate the SurfaceView used for the camera preview with the new camera object FROM the onResume of the CameraPreviewFragment, all issues solved.