问题描述
我创建一个Android Wear应用程序,试图发现一些手部动作,以做到这一点,我需要不断监测加速度输出。我不知道它将如何影响电池寿命。
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.
有关手机,我知道,而屏幕关闭时禁用加速度,以节省电池有喜欢的方法,但什么情况下手表电池的成本是多少? 由于Android手表可以计算你的步骤,事实证明,当你面对它面向您在屏幕上,我相信加速度计被打开,所有的时间呢。
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.
在这种情况下,将我的应用程序耗尽电池?
(接收加速度计值后的计算将是pretty的简单。)
(Calculations after receiving the accelerometer values will be pretty simple.)
推荐答案
我想大多数的Android设备的磨损保持加速度计在所有的时间来监视步,倾斜,以唤醒等。不过,我想大多数的这个或全部设备处理这个在一个低功率的CPU(传感器集线器),以允许主CPU睡觉大多数时间,当屏幕上没有
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.
如果你想监视的应用程序加速计,它需要主CPU来启动和运行在任何时候,并造成巨大的电池消耗(20-40毫安)。我一直在试图建立一个睡眠跟踪器尝试这样做,并连夜排水约70%的电池。
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.
您可以考虑配料它可以持续不断地监视加速度,同时允许主CPU睡觉的大部分时间。基本上你告诉传感器子系统来收集数据,而系统的其余部分睡觉,你只需设置一个闹钟唤醒在一个固定的时间间隔(约10秒的大多数Android设备的磨损),以收集最新的一批数据。
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.
这篇关于是否在Android上的加速度计漏电池穿什么? (Android的手表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!