屏幕锁定时继续读取 iPhone 加速计数据(手动)
我知道这个问题之前已经讨论过,如下所示: 在屏幕锁定时启用 iPhone 加速计
我尝试了帖子中提到的解决方案,包括添加 DeepSleepPreventer 模块,以及按照答案 在屏幕锁定时启用 iPhone 加速计,
UIDevice *device = [UIDevice currentDevice];
device.proximityMonitoringEnabled = YES;
方法 是添加:一旦我手动锁定 iPhone touch 屏幕,加速计就会停止发送数据。我正在使用 iOS SDK 4.3。我错过了什么吗?任何帮助将不胜感激。
I know this issue has been discussed before as in: Enable iPhone accelerometer while screen is locked
I tried the solution mentioned in the post, including adding the DeepSleepPreventer module, as well as enabling proximity sensor as suggested in the answer Enable iPhone accelerometer while screen is locked by adding:
UIDevice *device = [UIDevice currentDevice];
device.proximityMonitoringEnabled = YES;
However, as soon as I manually lock the screen on my iPhone touch, the accelerometer stops sending data. I'm using iOS SDK 4.3. Did I miss anything? Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无法通过 SDK 获取锁定的 ios 设备上的加速度计事件
It's impossible to get accelerometer events on locked ios devices via SDK