nicolasgramlich / AndEngine

Free Android 2D OpenGL Game Engine
http://www.andengine.org
Apache License 2.0
3.17k stars 1.35k forks source link

Android 6 - IAccelerationListener bug #278

Closed adamstyrc closed 8 years ago

adamstyrc commented 8 years ago

I compiled andEngine with PhysicsBox2d extension and took code from PhysicsExample.java:

https://github.com/nicolasgramlich/AndEngineExamples/blob/GLES2/src/org/andengine/examples/PhysicsExample.java

It seems the code is working. However the acceleration change is not propagated properly on Android 6 it seems (LG Nexus 5 with Android 6.0.2) - I checked on Android 5 and it's fine. When debugging I went down to Engine class and seems that onAccuracyChanged of Activity is not invoked because onSensorChanged is not invoked at all as well!

To my dismay, the demo app downloaded from Google Play is working properly on Android 6. Is there different implementation ?

adamstyrc commented 8 years ago

After digging and digging I found that accelerometer was broken and I had to restart phone...