当屏幕关闭加速度计onSensorChanged不叫 [英] Accelerometer onSensorChanged not called when screen is off

查看:321
本文介绍了当屏幕关闭加速度计onSensorChanged不叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在运行的所有时间和收集传感器数据的后台服务。
但是,当屏幕变暗,它将停止收集数据。

I have a background service which is running all the times and collects sensor data. But when the screen dims, it stops collecting the data.

我希望它在这种情况下,即使收集。

I want it to collect even in this case.

我的设备是HTC的myTouch。
我试图唤醒prtial锁,买它没有工作。

My device is HTC MyTouch. I have tried prtial wake lock, buy it didn't work.

谁能帮我解决这个问题。

Can anyone please help me fix this problem.

谢谢
Sowmya

Thanks Sowmya

推荐答案

这是一个记录的问题:的 HTTP://$c$c.google.com/p/android/issues/detail ID = 3708

This is a documented issue: http://code.google.com/p/android/issues/detail?id=3708

不幸的是不容易解决存在和解决方法也并不总是工作。这似乎是固定的Andr​​oid 2.3.3大部分(如果不是全部)设备虽然。

Unfortunately no easy fix exists and the workarounds also don't always work. It seems to be fixed in Android 2.3.3 for most (if not all) devices though.

这篇关于当屏幕关闭加速度计onSensorChanged不叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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