Hi there, I require the following in order to get my accelerometer based application to work:
1. a reliable sample rate of ~20Hz (can be faster - I can sub-sample) 2. a guarantee of service even when the phone goes to sleep I have coded up a background service to test the performance of the accelerometer. I use the SensorEventListener interface and record the timestamps of sensor events in the onSensorChanged() handler. I have noticed the following: - if I use a PARTIAL_WAKE_LOCK the device stops calling onSensorChanged() whenever the screen goes to sleep - if I use any other wake-lock the device stops calling onSensorChanged() when I press the power button - when the device is awake and onSensorChanged() is being called, I see a varied sample rate for SENSOR_DELAY_FASTEST (and this is without doing anything in the onSensorChanged() function, apart from setting a time-between-calls variable, i.e. no I/O) I should mention that my test device is an HTC Hero. So, my question: is it possible to achieve my requirements? Have I missed something? For example, is it possible to poll the sensor, waking up reliably using the AlarmManager? Many thanks in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---