hjam40 / Camera.MAUI

A CameraView Control for preview, take photos and control the camera options
MIT License
458 stars 75 forks source link

No cameras detected #125

Closed gbinnetov closed 8 months ago

gbinnetov commented 10 months ago

private void cameraView_CamerasLoaded(object sender, EventArgs e) {

if (cameraView.Cameras.Count > 0)
{
    cameraView.BarCodeDetectionEnabled = true;

    cameraView.Camera = cameraView.Cameras.First();
    MainThread.BeginInvokeOnMainThread(async () =>
    {
        await cameraView.StopCameraAsync();
        await cameraView.StartCameraAsync();
    });
}

}

======================

cameraView.Cameras.Count = 0

hjam40 commented 8 months ago

Hi, It works fine. Maybe it is an access camera permission error on your application.