protected void setupAccelerometer () { if (config.useAccelerometer) { motionManager.setAccelerometerUpdateInterval(config.accelerometerUpdate); CMMotionManager.Block_startAccelerometerUpdatesToQueueWithHandler handler = new CMMotionManager.Block_startAccelerometerUpdatesToQueueWithHandler() { @Override public void call_startAccelerometerUpdatesToQueueWithHandler (CMAccelerometerData cmAccelerometerData, NSError nsError) { updateAccelerometer(cmAccelerometerData); } }; motionManager.startAccelerometerUpdatesToQueueWithHandler(NSOperationQueue.alloc().init(), handler); } }
protected void setupAccelerometer () { if (config.useAccelerometer) { motionManager.setAccelerometerUpdateInterval(config.accelerometerUpdate); CMMotionManager.Block_startAccelerometerUpdatesToQueueWithHandler handler = new CMMotionManager.Block_startAccelerometerUpdatesToQueueWithHandler() { @Override public void call_startAccelerometerUpdatesToQueueWithHandler (CMAccelerometerData cmAccelerometerData, NSError nsError) { updateAccelerometer(cmAccelerometerData); } }; motionManager.startAccelerometerUpdatesToQueueWithHandler(NSOperationQueue.alloc().init(), handler); } }
protected void setupMagnetometer () { if (motionManager.isMagnetometerAvailable() && config.useCompass) compassSupported = true; else return; motionManager.setMagnetometerUpdateInterval(config.magnetometerUpdate); CMMotionManager.Block_startMagnetometerUpdatesToQueueWithHandler handler = new CMMotionManager.Block_startMagnetometerUpdatesToQueueWithHandler() { @Override public void call_startMagnetometerUpdatesToQueueWithHandler (CMMagnetometerData cmMagnetometerData, NSError nsError) { updateRotation(cmMagnetometerData); } }; motionManager.startMagnetometerUpdatesToQueueWithHandler(NSOperationQueue.alloc().init(), handler); }
protected void setupMagnetometer () { if (motionManager.isMagnetometerAvailable() && config.useCompass) compassSupported = true; else return; motionManager.setMagnetometerUpdateInterval(config.magnetometerUpdate); CMMotionManager.Block_startMagnetometerUpdatesToQueueWithHandler handler = new CMMotionManager.Block_startMagnetometerUpdatesToQueueWithHandler() { @Override public void call_startMagnetometerUpdatesToQueueWithHandler (CMMagnetometerData cmMagnetometerData, NSError nsError) { updateRotation(cmMagnetometerData); } }; motionManager.startMagnetometerUpdatesToQueueWithHandler(NSOperationQueue.alloc().init(), handler); }
protected void setupAccelerometer () { if (config.useAccelerometer) { motionManager.setAccelerometerUpdateInterval(config.accelerometerUpdate); CMMotionManager.Block_startAccelerometerUpdatesToQueueWithHandler handler = new CMMotionManager.Block_startAccelerometerUpdatesToQueueWithHandler() { @Override public void call_startAccelerometerUpdatesToQueueWithHandler (CMAccelerometerData cmAccelerometerData, NSError nsError) { updateAccelerometer(cmAccelerometerData); } }; motionManager.startAccelerometerUpdatesToQueueWithHandler(NSOperationQueue.alloc().init(), handler); } }
protected void setupMagnetometer () { if (motionManager.isMagnetometerAvailable() && config.useCompass) compassSupported = true; else return; motionManager.setMagnetometerUpdateInterval(config.magnetometerUpdate); CMMotionManager.Block_startMagnetometerUpdatesToQueueWithHandler handler = new CMMotionManager.Block_startMagnetometerUpdatesToQueueWithHandler() { @Override public void call_startMagnetometerUpdatesToQueueWithHandler (CMMagnetometerData cmMagnetometerData, NSError nsError) { updateRotation(cmMagnetometerData); } }; motionManager.startMagnetometerUpdatesToQueueWithHandler(NSOperationQueue.alloc().init(), handler); }