I am working on an Android app that collect accelerometer data. It detects way too much data in the onSensorChanged() listener and I found out that you cannot really set a sampling rate (you can suggest it but Android can ignore it). I want something like accelerometer readings every 0.5 seconds for about 10 mins for around 10 people. Is it better for me to capture that enormous accelerometer data for 10 mins and average it out for every 0.5 seconds or should I find a work around where I just probe the onSensorChanged() every 0.5 seconds? Do you know of any similar solutions out there?
Asked
Active
Viewed 106 times
1 Answers
0
It actually depends on your application or what you are trying to achieve here.
For example if you care about accuracy for a short period of time then let call be fast as possible , get the feedback and process it your way. this way you will not miss any data and they will be accurate.
On the other hand if you are trying to keep the the sensor alive for a longer period if time then you should limit its calls. It will save your battery and as well as it will avoid extra calls from the sensor.

Galib Imtiaz
- 106
- 2
- 7