An app I'm working on relies on quick spikes in accelerometer activity, like fractions of a second, so I have to have a pretty fast accelerometer. Android lets you specify accelerometer sampling rate, kind of: you can choose SENSOR_DELAY_NORMAL, SENSOR_DELAY_UI, SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST. Then the phone will try to give you samples at a rate that works for your app.
On NORMAL, my Nexus S gives me about 7Hz. Not at all fast enough. On UI, GAME, or FASTEST, I get about 49Hz, which is almost fast enough. So I gave some friends a little test app which determined their phone's FASTEST sample rate and here's what I found (readings in Hz):
Motorola Droid X: 5.19
Motorola Droid X2: 6.23
ZTE Blade: 9.11
HTC Nexus One: 24.86
HTC Evo 4G: 37.54
HTC Wildfire: 38.40*
HTC Desire: 47.27*
LG Nexus S: 49.44
Samsung Galaxy S3: 93.98
Motorola Atrix: 94.32
Sony Ericsson x10 Mini: 94.77**
Samsung Galaxy S2: 96.03, 97.5
Samsung Galaxy Nexus: 99.8
Samsung Note II: 100.0
Samsung Galaxy S3: 100
Samsung Galaxy Teos: 109.42*
LG Nexus 4: 198
(* from this stack overflow post)
(** from this slideshow, slide 13)
Want to add a reading? Here's how:
1. Enable installation of apps from unknown sources (Settings -> Security -> Unknown Sources)
2. Download this app
3. Tap "start", wait 5 seconds, and post (in a comment) which phone you have and what reading you get.
Edit: thanks all for adding to this! If you're looking for some other phones, check out the comments below.
On NORMAL, my Nexus S gives me about 7Hz. Not at all fast enough. On UI, GAME, or FASTEST, I get about 49Hz, which is almost fast enough. So I gave some friends a little test app which determined their phone's FASTEST sample rate and here's what I found (readings in Hz):
Motorola Droid X: 5.19
Motorola Droid X2: 6.23
ZTE Blade: 9.11
HTC Nexus One: 24.86
HTC Evo 4G: 37.54
HTC Wildfire: 38.40*
HTC Desire: 47.27*
LG Nexus S: 49.44
Samsung Galaxy S3: 93.98
Motorola Atrix: 94.32
Sony Ericsson x10 Mini: 94.77**
Samsung Galaxy S2: 96.03, 97.5
Samsung Galaxy Nexus: 99.8
Samsung Note II: 100.0
Samsung Galaxy S3: 100
Samsung Galaxy Teos: 109.42*
LG Nexus 4: 198
(* from this stack overflow post)
(** from this slideshow, slide 13)
1. Enable installation of apps from unknown sources (Settings -> Security -> Unknown Sources)
2. Download this app
3. Tap "start", wait 5 seconds, and post (in a comment) which phone you have and what reading you get.
Edit: thanks all for adding to this! If you're looking for some other phones, check out the comments below.
Motorola Droid X: 5.06, 5.67, 3.98, 7.15, 4.11
ReplyDeleteMotorola Droid X2: 6.93, 5.47, 3.98, 9.98, 4.79
ReplyDeleteHTC EVO 4G: 38.90, 34.98, 37.15, 36.77, 39.90
Samsung Galaxy SII (tmo): 96.10, 95.56, 95.45, 97.00, 96.05
ReplyDeleteNexus 1: 25.15, 24.7, 24.79, 24.69, 24.98
ReplyDeleteAwesome. Thanks, guys!
ReplyDeleteOh great, this was exactly what I was looking for!
ReplyDeleteZTE Blade: 8.84 9.54 8.97
These results are perfectly in line with what I've been getting with my own code on the same phone. It must be the phone that's slow and not my code.
HTC One X: 44.68, 43.47, 43.98
ReplyDeletesamsung galaxy s i9000 65 (Hz?)
ReplyDeleteNexus7: 202.08 xD
ReplyDeleteWould it be possible to get you Source Code for the AccelerometerTest.apk?
ReplyDeleteIf so, please send it to me at: troels@siggaard.com
Thanks!
Even better, I just put it up on github: https://github.com/dantasse/AccelerometerTest
ReplyDeleteEnjoy!
Thank you very much.
DeleteHave you guys tested the Motorola Droid Razr Maxx
ReplyDeleteThe program doesnt work on SE Xperia Ray
ReplyDeleteJust shows Working...
And nothing happens.
Here too... LG L3
Deleteand this, axioo picophone m4p
DeleteAcer Liquid Glow E330: 10
ReplyDeleteHi Dan, thanks for the post,
ReplyDeleteits a bit late, but here is your Nexus 4 data! ;)
Google L-Ge Nexus 4: 198.84, 198.60, 198.80, 198.64, 198.88
Kind regards
Thanks for the post.
ReplyDeleteSamsung Galaxy S3: 100.08 100.04 99.96 100.04 100.00
LG Nexus 5 : 201
ReplyDeleteHTC One (M8): 97, 98.4, 98.02, 98.28, 97.62
ReplyDeletesamsung galaxy s5: 100.28, 100.52, 99.76
ReplyDeleteLG-P880: 50
ReplyDeleteNexus 5: 201.8
ReplyDeleteHTC One (M8): 99.92
HTC One X: 100.26
Nexus 5: 200.49
ReplyDeleteOneplus 2 (Model A2003): 199.00, 199.12 (Usually achieves 199.12)
ReplyDeleteIt is not giving any output after starting
ReplyDeleteWorking .....
what should I do?
Sorry to hear that. Unfortunately, I'm not supporting this app anymore. (I barely know how it worked in the first place :P You're welcome to debug it to figure it out (code's linked above).
DeleteGalaxy S7: from 99.94 to 100.12 but values can fall significantly as low as 9.01 when doing thing in the background like closing/starting other apps.
ReplyDeleteXiaomi Mi Max 2: 198.00
ReplyDelete