0

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);
Gerard E
  • 27
  • 9
  • What should an accepted answer to this question include? What would you like to accomplish in a device with no such sensors? Or in a device that's physically installed to some location and newer moved afterwards? There's actually no question in this question. :) – Markus Kauppinen Aug 07 '18 at 11:53
  • 1
    Hi, I am actually trying to determine the distance from the minix to an object using the camera attached in the minix. So I'd like to know if something like this is possible with the minix (or if I need to add some hardware to it ). Sorry for my English and misunderstandings – Gerard E Aug 08 '18 at 08:46

0 Answers0