reconnect method

Future<void> reconnect()

Reconnects to the camera service after another process used it.

After unlock is called, another process may use the camera; when the process is done, you must reconnect to the camera, which will re-acquire the lock and allow you to continue using the camera.

Camera is automatically locked for applications in 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.

Throws PlatformException if a connection cannot be re-established (for example, if the camera is still in use by another process) or release has been called on this Camera instance.

Implementation

Future<void> reconnect() => _channel.$reconnect(this);