public void stopListeningForUpdates() { sensorManager.unregisterListener(stepListener); }
public void startListeningForUpdates() { Sensor accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); sensorManager.registerListener(stepListener, accelerometer, SensorManager.SENSOR_DELAY_NORMAL); }