nvanbenschoten/motion

Demo doesn't work on Android 5.1.1

haskellcamargo opened this issue · 7 comments

The provided demo APK just exhibits a static image, without any other action that uses the sensor.
The used device is a Moto G3.

Example

@haskellcamargo Works fine here.

Same issue on 6.0 + Nexus 5 / 5x

Just changed SENSOR_DELAY_FASTEST to SENSOR_DELAY_GAME and it works fine.

Issue

On Moto G3, it didn't work neither with SENSOR_DELAY_FASTEST nor SENSOR_DELAY_GAME.
Demo

Moto G3 doesn't have a gyroscope, right?
In that case, i think that Sensor.TYPE_ROTATION_VECTOR is the problem, could you try with Sensor.TYPE_GAME_ROTATION_VECTOR?

I've already done it. Neither of them work. Both fail with the same E/SensorManager: sensor or listener is null error.

can we make this work for lower android versions like kitkat.
I tried to test this on samsung grand 2 mobile and made changes like,

changed SENSOR_DELAY_FASTEST to SENSOR_DELAY_GAME and
Sensor.TYPE_ROTATION_VECTOR to Sensor.TYPE_GAME_ROTATION_VECTOR

same here.