Android.Hardware.Camera.Lock Method
Re-locks the camera to prevent other processes from accessing it.

Syntax

[Android.Runtime.Register("lock", "()V", "")]
public void Lock ()

Exceptions

TypeReason
Java.Lang.RuntimeExceptionif the camera cannot be re-locked (for example, if the camera is still in use by another process).

Remarks

Re-locks the camera to prevent other processes from accessing it. Camera objects are locked by default unless Camera.Unlock is called. Normally Camera.Reconnect is used instead.

Since API level 14, camera is automatically locked for applications in Android.Media.MediaRecorder.Start. Applications can use the camera (ex: zoom) after recording starts. There is no need to call this after recording starts or stops.

If you are not recording video, you probably do not need this method.

[Android Documentation]

Requirements

Namespace: Android.Hardware
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 5