It is unlikely for a picture capture to fail, but it is possible.
Handling Capture Failures
takePicture method may throw a
If this exception is thrown you should close the camera, throw away the camera instance and create a new camera instance to use instead.
A subsequent capture with the new camera instance should work.
You could create a new camera instance rather than attempting to reopen the existing camera.
This is just an example, implement whatever error-handling and recovery mechanism you need.