Android 应用程序耗尽电池的速度太快
我正在开发的 Android 应用程序需要从传感器读取信息,主要是加速度计。我希望我的应用程序能够从传感器获取信息,但我不希望手机屏幕一直亮着,因为这会很快耗尽电池。我需要找到一种方法让手机从传感器读取信息,但保持锁定或睡眠状态。该应用程序应该不断在后台运行并读取此信息。有什么想法吗?
The android application I am developing needs to read the info from the sensors, mostly the accelerometer. I want my application to be able to get the info from the sensors, but I do not want the phone's screen to be constantly on because this drains the battery very fast. I need to find a way for the phone to read the info from the sensors, but remain locked or in sleep. The application is supposed to be running in the background constantly and be reading this info. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用服务。
Use Services.
您可能正在寻找服务。
You're probably looking for a Service.