问题
I Implemented a system to take photo in my apps with Android class Camera. All run well but after taken photo I want show the preview at the user and let him the choice to save the picture or cancel it. The problem I have is with the preview. The preview appears after the mCamera.startPreview();
and is shown during only some little seconds with or without mCamera.stopPreview();
. I would extend display time or freeze preview until some certain event.
Somebody know a way to congeal the preview for a time ?
Thanks.
回答1:
you will need to fetch the image taken and display it.
回答2:
The preview will be stopped after you take a picture. However, the stopped preview does not necessarily correspond to the picture that was actually taken. For that, you'll have to fetch the picture and display it through an ImageView or something similar.
http://developer.android.com/reference/android/hardware/Camera.html#takePicture(android.hardware.Camera.ShutterCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback)
This method is only valid when preview is active (after startPreview()). Preview will be stopped after the image is taken; callers must call startPreview() again if they want to re-start preview or take more pictures. This should not be called between start() and stop(). After calling this method, you must not call startPreview() or take another picture until the JPEG callback has returned.
来源:https://stackoverflow.com/questions/8304277/the-way-to-freeze-the-camera-preview