Good news! I upgraded my device to cupcake, and it appears that I can now receive onSensorChanged events when the screen is off, provided that I hold a Partial Wake Lock.
However, the sampling frequency seems to be far more sporadic. I think that it has to do with the fact that cupcake now flips the orientation of all applications, and when it does the redrawing, it suspends the application (and thus the sensor listeners). I'm experimenting with turning this auto-orientation behaviour off (Anyone know how to do this on an application-by-application basis, rather than turning it off in the device settings?). Anyway, things look good for those of us who wanted sensor data without having to leave the screen on. Jordan On Apr 20, 10:55 am, Jordan Frank <[email protected]> wrote: > Known but not resolved. Even in the bug report that is mentioned in > the thread that you quoted, the only response has been "things might > have changed in cupcake". Of course determining what has changed, or > if this specific problem has been fixed requires wiping the phone and > installing cupcake*, whereas it seems like someone in the know could > say "we fixed this", or "this is still the behaviour" and we could > stop discussing this. > > Jordan > > * If I haven't heard anything more about this by the end of the week, > I will probably end up wiping and upgrading to cupcake. > > On Apr 17, 2:13 pm, Carter <[email protected]> wrote: > > > This is a known issue. > > > See this > > thread:http://groups.google.com/group/android-developers/browse_thread/threa... > > > On Apr 17, 4:18 am, David Burström <[email protected]> wrote: > > > > Hi Jordan, > > > > I can only agree with your findings. Regardless of which lock is being > > > used, the service stops sending callbacks as soon as the screen turns > > > off or the power button is pressed. > > > > :David > > > > On Mar 16, 3:01 pm, Jordan Frank <[email protected]> wrote: > > > > > A partial wakelock doesn't help because, as I have already explained, > > > > as soon as the display goes off, the accelerometers go off. I can keep > > > > the CPU awake, and my program continues to run when the display is > > > > off. However, as soon as the display goes off, the accelerometers go > > > > silent. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

