public CameraPreviewRenderer() { _orientationListener = new OrientationListener(); _orientationListener.OrientationChanged += OnOrientationChanged; _flashModeAutoFlash = new NSNumber((long)AVCaptureFlashMode.Auto); }
/** * @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); } }
/** * @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))); }
/** * @see {@link Engine#enableOrientationSensor(Context, IOrientationListener, OrientationSensorOptions)} */ protected bool EnableOrientationSensor(IOrientationListener pOrientationListener, OrientationSensorOptions pLocationSensorOptions) { return(this.mEngine.EnableOrientationSensor(this, pOrientationListener, pLocationSensorOptions)); }
/** * @see {@link Engine#enableOrientationSensor(Context, IOrientationListener)} */ protected bool EnableOrientationSensor(IOrientationListener pOrientationListener) { return(this.mEngine.EnableOrientationSensor(this, pOrientationListener)); }