How to use Android.Hardware.Camera2 in Xamarin

0

I'm having some difficulty understanding how to use it

  

Android.Hardware.Camera2;

How the OpenCamera () method works and what goes in 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

    
asked by anonymous 16.11.2017 / 13:15

1 answer

0

Using the AvailabilityCallback class

    

23.11.2017 / 15:18