How to use Android.Hardware.Camera2 in Xamarin

Asked

Viewed 211 times

0

I’m having a little trouble figuring out how to use it

Android.Hardware.Camera2;

how the Opencamera() method works and what you enter as a parameter in Availabilitycallback.

Can someone help me?

if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Lollipop)
{
    CameraManager cameraManager = ((CameraManager)Context.GetSystemService(Context.CameraService));
    //AvailabilityCallback stateCallback = ;

    Control.Preview = cameraManager.OpenCamera(cameraManager.GetCameraIdList()[0], WHAT_HERE?, null);
 }
 else
 {
    Control.Preview = Camera.Open((int)e.NewElement.Camera);
 }

Thank you very much

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.