博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[置顶] Android问题----Android OnSensorChanged() not working when screen lock is on
阅读量:4984 次
发布时间:2019-06-12

本文共 1133 字,大约阅读时间需要 3 分钟。

Some of the Android OS versions have a bug which stops the sensors such as the accelerometer recording when the screen lock is on.

The bug has been submitted but has not been fixed in all instances

Below is a list of Phones and OS versions the do and don’t have the bug + some are reported to be intermittent.

Bug No Bug Intermittent
Motorola Milestone – 2.1 Google Nexus One – 2.2 Google Nexus One – 2.2
Nexus One – 2.1 T-Mobile G1 – 1.6
HTC Desire – 2.2 Google ION – 1.6
HTC EVO 4G – 2.2  
Motorola Droid – 2.2  
HTC Eris – 2.2  
Droid Incredible – 2.2  
HTC Legend 2.1
HTC Wildfire 2.2

Update: There are a couple of workarounds that i have found

The first works for all phones but is a drain on the battery and involves keeping the screen on all the time. It changes the timeout of the screen to a higher number:

The second seems to only work on some phones such as the Milestone and Droid which registers the sensor, then un-registers the sensor when the screen is off and re-registers the sensor. Long winded but if it works…

If you enjoyed this post, make sure you !

转载于:https://www.cnblogs.com/anjon520/archive/2013/04/01/3249936.html

你可能感兴趣的文章
Day 04
查看>>
centos7更改网卡名称
查看>>
ckeditor_学习(1) 基本使用
查看>>
1013团队Beta冲刺day4
查看>>
二叉树输出
查看>>
利用lambda和条件表达式构造匿名递归函数
查看>>
Spring学习之常用注解(转)
查看>>
手工模拟Oracle数据块逻辑讹误引发,ORA-00600:[13013] [5001]一例
查看>>
CSS魔法堂:你真的理解z-index吗?
查看>>
《30天自制操作系统》笔记(12)——多任务入门
查看>>
Go单元测试与基准测试
查看>>
如何了解熟悉业务
查看>>
浅析回调函数和Schedule
查看>>
07黑盒测试方法
查看>>
小程序开放插件功能,可供其他小程序使用
查看>>
poj2398计算几何叉积
查看>>
lightoj1138
查看>>
HDU 3001 Travelling
查看>>
C++Primer读书笔记----第四章数组与指针(2)
查看>>
在iOS中使用Phonegap防止Webview被上下拖动
查看>>