public CameraPreviewRenderer()
        {
            _orientationListener = new OrientationListener();
            _orientationListener.OrientationChanged += OnOrientationChanged;

            _flashModeAutoFlash = new NSNumber((long)AVCaptureFlashMode.Auto);
        }
Exemplo n.º 2
0
        /**
         * @return <code>true</code> when the sensor was successfully enabled, <code>false</code> otherwise.
         */
        public bool EnableOrientationSensor(/* final */ Context pContext, /* final */ IOrientationListener pOrientationListener, /* final */ OrientationSensorOptions pOrientationSensorOptions)
        {
            /* final */
            SensorManager sensorManager = (SensorManager)pContext.GetSystemService(Context.SensorService);

            if (this.IsSensorSupported(sensorManager, SensorType.Orientation))
            {
                this.mOrientationListener = pOrientationListener;

                if (this.mOrientationData == null)
                {
                    this.mOrientationData = new OrientationData();
                }

                this.RegisterSelfAsSensorListener(sensorManager, SensorType.Orientation, pOrientationSensorOptions.getSensorDelay());

                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
 /**
  * @see {@link Engine#enableOrientationSensor(Context, IOrientationListener, OrientationSensorOptions)}
  */
 public bool EnableOrientationSensor(/* final */ Context pContext, /* final */ IOrientationListener pOrientationListener)
 {
     return(this.EnableOrientationSensor(pContext, pOrientationListener, new OrientationSensorOptions(SENSORDELAY_DEFAULT)));
 }
Exemplo n.º 4
0
 /**
  * @see {@link Engine#enableOrientationSensor(Context, IOrientationListener, OrientationSensorOptions)}
  */
 protected bool EnableOrientationSensor(IOrientationListener pOrientationListener, OrientationSensorOptions pLocationSensorOptions)
 {
     return(this.mEngine.EnableOrientationSensor(this, pOrientationListener, pLocationSensorOptions));
 }
Exemplo n.º 5
0
 /**
  * @see {@link Engine#enableOrientationSensor(Context, IOrientationListener)}
  */
 protected bool EnableOrientationSensor(IOrientationListener pOrientationListener)
 {
     return(this.mEngine.EnableOrientationSensor(this, pOrientationListener));
 }