Sunday, 7 February 2021

Tap on Camera Screen return an exception in Xamarin

Here is the Reproducible Demo https://github.com/x0axz/CustomRenderer

In my Xamarin App, there is a Custom Camera Renderer for Android, which is being called from Xaml through MessagingCenter.Send<object>(this, "A");.

It's working fine. The only problem is that, on taping/clicking the Camera Screen, on some mobiles it hangs the screen and on other it returns an error takePicture failed.

.xml

<local:CameraPreview
    x:Name="CameraPreview"
    Camera="Rear"/>

Code for CameraPreview.cs

Code for CameraPreviewRenderer.cs

The reason I didn't paste code here, because those are huge amount of code, and it won't look good here. The complete code is available on repo. Thanks in advance :)



from Tap on Camera Screen return an exception in Xamarin

No comments:

Post a Comment