Example usage for android.hardware SensorManager SENSOR_STATUS_UNRELIABLE

List of usage examples for android.hardware SensorManager SENSOR_STATUS_UNRELIABLE

Introduction

In this page you can find the example usage for android.hardware SensorManager SENSOR_STATUS_UNRELIABLE.

Prototype

int SENSOR_STATUS_UNRELIABLE

To view the source code for android.hardware SensorManager SENSOR_STATUS_UNRELIABLE.

Click Source Link

Document

The values returned by this sensor cannot be trusted, calibration is needed or the environment doesn't allow readings

Usage

From source file:com.polyvi.xface.extension.XAccelerometerExt.java

public XAccelerometerExt() {
    mX = 0;
    mY = 0;
    mZ = 0;
    mTimestamp = 0;
    mStatus = STOPPED;
    mAccuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}

From source file:org.jitsi.android.gui.call.ProximitySensorFragment.java

/**
 * {@inheritDoc}/*from   w w w. j av a  2 s .c o  m*/
 */
public void onAccuracyChanged(Sensor sensor, int accuracy) {
    if (accuracy == SensorManager.SENSOR_STATUS_UNRELIABLE) {
        sensorDisabled = true;
        screenOn();
    } else {
        sensorDisabled = false;
    }
}

From source file:com.polyvi.xface.extension.XAccelerometerExt.java

/**
 * ??accelerometer sensor/*from   w w w.  j a v a 2 s. com*/
 */
private void stop() {
    if (STOPPED != mStatus && null != mSensorManager) {
        mSensorManager.unregisterListener(this);
    }
    mStatus = STOPPED;
    mAccuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}

From source file:org.dartlang.phonegap.barometer.BarometerListener.java

/**
 * Stop listening to barometer sensor.// ww w  .  j a  va  2  s.  c o  m
 */
private void stop() {
    stopTimeout();
    if (this.status != BarometerListener.STOPPED) {
        this.sensorManager.unregisterListener(this);
    }
    this.setStatus(BarometerListener.STOPPED);
    this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}

From source file:com.android.plugins.GyroscopeListener.java

/**
 * Stop listening to gyroscope sensor./*from ww w .j  av a2  s  . co m*/
 */
private void stop() {
    stopTimeout();
    if (this.status != GyroscopeListener.STOPPED) {
        this.sensorManager.unregisterListener(this);
    }
    this.setStatus(GyroscopeListener.STOPPED);
    this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}

From source file:org.dartlang.phonegap.thermometer.ThermometerListener.java

/**
 * Stop listening to thermometer sensor.
 *//*from   ww w .  j ava2s . c o m*/
private void stop() {
    stopTimeout();
    if (this.status != ThermometerListener.STOPPED) {
        this.sensorManager.unregisterListener(this);
    }
    this.setStatus(ThermometerListener.STOPPED);
    this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}

From source file:org.apache.cordova.AccelListener.java

/**
 * Stop listening to acceleration sensor.
 *///  w  w  w  .j a va  2s  .  c  o  m
private void stop() {
    if (this.status != AccelListener.STOPPED) {
        this.sensorManager.unregisterListener(this);
    }
    this.setStatus(AccelListener.STOPPED);
    this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}

From source file:org.skt.runtime.html5apis.Accelerometer.java

/**
 * Stop listening to acceleration sensor.
 *//*from  www  .j a v  a 2s  .c o  m*/
private void stop() {
    if (this.status != Accelerometer.STOPPED) {
        this.sensorManager.unregisterListener(this);
    }
    this.setStatus(Accelerometer.STOPPED);
    this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}

From source file:org.apache.cordova.core.AccelListener.java

/**
 * Stop listening to acceleration sensor.
 *///from   w w  w . j av  a2  s  .co  m
private void stop() {
    stopTimeout();
    if (this.status != AccelListener.STOPPED) {
        this.sensorManager.unregisterListener(this);
    }
    this.setStatus(AccelListener.STOPPED);
    this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}

From source file:com.grumpysailor.cordova.magnetsensor.MagnetSensor.java

/**
 * Stop listening to acceleration sensor.
 *///from w w  w. jav  a2  s .c o  m
private void stop() {
    stopTimeout();
    if (this.status != MagnetSensor.STOPPED) {
        this.mSensorManager.unregisterListener(this);
    }
    this.setStatus(MagnetSensor.STOPPED);
    this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}