I have a Minix X68-i with Android 5.1 , I developed an application which uses the accelerometer and the gyroscope. This application works well in my mobile phone but in the Minix it doesn't work, I suppose is because the Minix doesn't have this sensors but I don't know what to do. In the Debug mode the Sensors aren't null but the application never enters in the onSensorChanged.
I attach the code where I register the sensor.
accelerometer = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
sm.registerListener(new SensorEventListener()
{
@Override
public void onSensorChanged(SensorEvent event)
{
setXYZ(event.values[0], event.values[1], event.values[2]);
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy)
{
//nothing here
}
}, accelerometer, SensorManager.SENSOR_DELAY_NORMAL);