Code example for Camera

Methods: setOneShotPreviewCallback

0
		camera.setParameters(parameters);
	} 
 
	public void requestPreviewFrame(final PreviewCallback callback)
	{ 
		camera.setOneShotPreviewCallback(callback);
	} 
 
	public PlanarYUVLuminanceSource buildLuminanceSource(final byte[] data)
	{ 
		return new PlanarYUVLuminanceSource(data, cameraResolution.width, cameraResolution.height, framePreview.left, framePreview.top,
				framePreview.width(), framePreview.height(), false);
	} 
 
	public void setTorch(final boolean enabled)
	{ 
		if (enabled != getTorchEnabled(camera))
			setTorchEnabled(camera, enabled);
	} 
 
	private static boolean getTorchEnabled(final Camera camera)