Journeyapps ZXing android embedded学习 笔记
网址:

CameraPreview is a view that handles displaying of a camera preview on a SurfaceView. It is intended to be used as a base for realtime processing of camera images, e.g. barcode decoding or OCR, although none of this happens in CameraPreview itself.
The camera is managed on a separate thread, using CameraInstance.
Two methods MUST be called on CameraPreview to manage its state:
- resume() - initialize the camera and start the preview. Call from the Activity's onResume().
- pause() - stop the preview and release any resources. Call from the Activity's onPause().
Startup sequence:
- Create SurfaceView.
- open camera.
- layout this container, to get size
- set display config, according to the container size
- configure()
- wait for preview size to be ready
- set surface size according to preview size
- set surface and start preview
浙公网安备 33010602011771号