开发者

iOS4 iPhone turn screen off, keep accelerometer on

I know this has been asked before, but the answers that I see are 2 years开发者_C百科 back. So I'll rephrase the question: are there any new power management APIs in iOS4 that I can take advantage of to turn off the screen?

-Overlaying a black view on top of an existing view still drives the screen's backlight and refresh rate.

Can I let the device screen timeout normally and then run my app in the background? I need to collect accelerometer data.

Thank you!


As far as I know you can't collect accelerometer data while the phone is locked. Also there are no power management APIs.

I found this for you tho where they give a trick of using proximity sensor but that doesn't seem like a reasonable solution. Enable iPhone accelerometer while screen is locked

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜