At this point you need to call takePicture()
on the camera when the condition is met. Then startPreview()
in the first line of the onPictureTaken()
callback that you will have to provide in order for the camera to continue.
When all conditions are met, also be sure to release()
the camera before leaving within your onPause()
of the Activity that uses the camera. As this could cause problems for yourself on other loads of the app or other programs.
1
solved Capture image when conditions are met