Sdílet prostřednictvím


Camera.StartPreview Method

Definition

Caution

deprecated

Starts capturing and drawing preview frames to the screen.

[Android.Runtime.Register("startPreview", "()V", "")]
[System.Obsolete("deprecated")]
public void StartPreview ();
[<Android.Runtime.Register("startPreview", "()V", "")>]
[<System.Obsolete("deprecated")>]
member this.StartPreview : unit -> unit
Attributes

Remarks

Starts capturing and drawing preview frames to the screen. Preview will not actually start until a surface is supplied with #setPreviewDisplay(SurfaceHolder) or #setPreviewTexture(SurfaceTexture).

If #setPreviewCallback(Camera.PreviewCallback), #setOneShotPreviewCallback(Camera.PreviewCallback), or #setPreviewCallbackWithBuffer(Camera.PreviewCallback) were called, Camera.PreviewCallback#onPreviewFrame(byte[], Camera) will be called when preview data becomes available.

Java documentation for android.hardware.Camera.startPreview().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to