-
Notifications
You must be signed in to change notification settings - Fork 209
Missing StartCameraAsync and StopCameraAsync #223
Copy link
Copy link
Open
Description
Upgrading my app from Version 0.16.9.
As I have a ViewModel first approach that creates and destroys its Views on the fly I had a
private void StartCamera()
{
if (!camerasLoaded)
return;
if (cameraView.Cameras.Count > 0)
{
MainThread.BeginInvokeOnMainThread(async () =>
{
cameraView.Camera = cameraView.Cameras.First();
await Task.Delay(500);
await cameraView.StartCameraAsync();
cameraView.BarCodeDetectionEnabled = true;
});
}
}
private void StopCamera()
{
if (cameraView.Camera is not null)
{
MainThread.BeginInvokeOnMainThread(async () =>
{
await cameraView.StopCameraAsync();
});
}
}
so that I can reuse the camera (even on different views).
My current problem is that the camera works for the first time the view is created but after changing the view it is only black.
Is there a way to get this working again?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels