hjam40 / Camera.MAUI

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

Camera not loading on some Samsung devices #176

Open tomovski opened 2 months ago

tomovski commented 2 months ago

After updating to .net 8.0.3 version the camera stopped loading for some Samsung devices. And it's only happening on the first camera cameraView.Camera = cameraView.Cameras.First(); While it is working on other Samsung devices, Pixel and iPhone.

I also receive a success result in the StartCameraAsync, but nothing is rendered. var result = await cameraView.StartCameraAsync();

I've also tried the the workaround with:

await cameraView.StopCameraAsync();
var result = await cameraView.StartCameraAsync();

and tried with some small delay before stopping/starting the camera, but nothing seems to work.

I am using the latest version of Camera.MAUI and Camera.MAUI.ZXing. I saw some other people also facing the issue. Is there any other workaround ? Many thanks

jefterdorea commented 1 month ago

I'm also experiencing this problem.

Interestingly, the problem has already occurred with Samsung and Motorola devices. But for the vast majority of users, everything is working perfectly.

No error is displayed, it just doesn't display the screenshot.

moze-max commented 1 month ago

你可以试试先运行await cameraView.StopCameraAsync();,然后再运行await cameraView.StartCameraAsync();

jefterdorea commented 1 month ago

Thank you very much @moze-max , it worked very well. Simple as that.