0

I have tried integrating pedometer. I have came across one issue that onSensorChanges is not being called in specifically ONEPLUS 8 Can any one help ?

I am registering listener as below

 sensorManager.registerListener(SensorService.this, sSensor, SensorManager.SENSOR_DELAY_FASTEST);

Not adding full code as it is working in other device liek Samsung A50.

3
  • What type of a sensor is sSensor here? Not all devices have all the sensors, but I suppose the accelerometer at least should exist on all phones. A "step detector" or "step counter" might not. Commented Sep 4, 2020 at 14:15
  • 1
    It is of step detector type Commented Sep 4, 2020 at 14:27
  • I would highly recommend confirming if the device has Step Detecting sensor/ pedometer sensor. There are many devices which do not have an inbuilt pedometer.
    – cdevansh
    Commented Sep 4, 2020 at 15:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.