Does the accelerometer drain battery on Android Wear? (Android watch)

折月煮酒 提交于 2019-12-30 05:09:25

问题


I'm creating an Android Wear app that tries to detect some of the hand movements, to do it, I need to continuously monitor the accelerometer output. I'm wondering how it will affect the battery life.

For phones, I know that there are methods like "disable accelerometer while screen is turned off" to save battery, but what's the battery cost in case of watches? Since Android watch can count your steps and it turns on the screen when you face it towards your face, I believe the accelerometer is turned-on all the time anyway.

in this case, will my app drain the battery?

(Calculations after receiving the accelerometer values will be pretty simple.)


回答1:


I think most android wear devices keeps the accelerometer on all the time to monitor steps, tilt-to-wake etc. However, I think most or all of this devices handles this in a low powered CPU (Sensor hub) to allow the main CPU to sleep most of the time when the screen isn't on.

If you want to monitor the accelerometer from an app, it would require the main CPU to be up and running at all times and cause a huge battery drain (20-40 mAh). I've tried this in an attempt to create a sleep tracker and drained about 70% battery over night.

You could consider batching which allows you to continuously monitor the accelerometer while allowing the main CPU to sleep most of the time. Basically you tell the sensor subsystem to gather data while the rest of the system sleeps and you just set an alarm to wakeup at a fixed interval (around 10 s for most android wear devices) to gather the latest batch of data.



来源:https://stackoverflow.com/questions/25617196/does-the-accelerometer-drain-battery-on-android-wear-android-watch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!