loli1989 loli1989 - 1 year ago 139
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);

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download