Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotation Sensor problem #10

Open
ersanyakit opened this issue Jul 15, 2016 · 2 comments
Open

Rotation Sensor problem #10

ersanyakit opened this issue Jul 15, 2016 · 2 comments

Comments

@ersanyakit
Copy link

"Sorry, your device appears to be incompatible ( rotation sensor)"

LG Magna

game cant be start.

@mesutpiskin
Copy link

Does anyone know the reason for this error?

Tested;
Samsung Note Series, LG G2, G3 Vestel Venüs Series and virtual devices

@vbarthel-fr
Copy link
Member

vbarthel-fr commented Jul 10, 2017

Hi @mesutpiskin,

this error happens when the "compatibility" mode is used and one of the following sensor cannot be retrieved by the application:

  • Sensor.TYPE_ACCELEROMETER
  • Sensor.TYPE_MAGNETIC_FIELD
  • Sensor.TYPE_GYROSCOPE

Here is the line where the "problem" is raised:

private void useCompatibilityMode() {
//Compatibility Mode for Rotation Sensor
mAccelerationSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
mMagneticSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
mGyroscopeSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
if (mAccelerationSensor == null || mMagneticSensor == null || mGyroscopeSensor == null) {
setResult(RESULT_SENSOR_NOT_SUPPORTED, null);
finish();
} else {
Toast.makeText(this, getString(R.string.toast_compatibility_mode), Toast.LENGTH_SHORT).show();
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants