I have to collect accelerometer data from my Android phone, so I have made a little program to do that.
After some tests, I have found that my Nexus S accelerometer’s rate is always 50 values per second when the phone is active, and 6 values per second when it is asleep (with a PARTIAL_WAKE_LOCK), whatever the rate I ask for (NORMAL, UI, GAME or FASTEST).
So I decided to install an application found on the Internet which tests the rate of the accelerometer : http://samoht.fr/tuto/accelerometers-frequency-on-android-with-code
But I got the same “error” : whatever the rate I ask for, it is always 50 values per second when the phone is active.
I don’t understand why my phone behaves this way. Is it a problem :
- related to the Nexus S ?
- specific to my phone ?
- related to Android 4 ?
EDIT : I have tested the program on another Nexus S (Android 4), and I have the same problem.
So it seems to eliminate one of the possibilities listed above: it is not related only to my phone.
I have performed some tests on different smartphones. Here are the results:
Note that the tests have been performed using a partial wake lock. Without it, the Nexus S provides no data at all when it is asleep.
There is also a useful list of smartphones which accelerometers send (or not) compatible data when asleep: http://www.saltwebsites.com/2012/android-accelerometers-screen-off