Android Wear 上的加速度计会耗尽电池电量吗?(安卓手表) [英] Does the accelerometer drain battery on Android Wear? (Android watch)

查看:23
本文介绍了Android Wear 上的加速度计会耗尽电池电量吗?(安卓手表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个 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.

在这种情况下,我的应用会耗尽电池电量吗?

(收到加速度计值后的计算将非常简单.)

(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 mAh).我已经尝试过这个尝试来创建一个睡眠跟踪器,但一夜之间消耗了大约 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.

您可以考虑 batching 允许您持续监控加速度计,同时允许主 CPU 大部分时间都处于休眠状态.基本上,您告诉传感器子系统在系统其余部分休眠时收集数据,并且您只需设置闹钟以固定时间间隔(对于大多数 android 穿戴设备约为 10 秒)唤醒以收集最新一批数据.

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 Wear 上的加速度计会耗尽电池电量吗?(安卓手表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆