weekends are for leisure

  • Archive
  • RSS

Android accelerometer, getting a wake lock while phone is asleep

There’s a quirk with Android that renders a partial wake lock useless if you want to poll the accelerometer while the screen is off. The workaround is to acquire a screen-dim + acquire-causes-wakeup wake lock. The screen turns on while you’re polling, but that’s the only solution I’ve found.

I’ve implemented the workaround in my GPSing project. Hopefully this won’t cause a drastic change in battery usage.

    • #android
    • #programming
    • #accelerometer
    • #gps
  • 10 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

1 Notes/ Hide

  1. alanszlosek posted this
← Previous • Next →

About

whose blog? mine.
  • RSS
  • Random
  • Archive
  • Mobile
Effector Theme by Pixel Union