loli1989 loli1989 - 3 months ago 63
Android Question

Getting sensor values per second

Is there any way that I can get the sensor reading per second?
what is SENSOR_DELAY_NORMAL rate in seconds?

sm.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL);


The delay specified by SENSOR_DELAY_* is only a suggested delay, actual results might come faster or slower. If you only need one reading per second you can use the slowest rate (SENSOR_DELAY_NORMAL), it should update about 5 times per second. You'll need your own timing if you want to do something exactly once per second, though.