开发者

Continue to read iPhone accelerometer data while screen is locked (manually)

开发者 https://www.devze.com 2023-04-08 04:28 出处:网络
I know this issue has been discussed before as in: Enable iPhone accelerometer while screen is locked

I know this issue has been discussed before as in: Enable iPhone accelerometer while screen is locked

I tried the solution mentioned in th开发者_JAVA百科e 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.


It's impossible to get accelerometer events on locked ios devices via SDK

0

精彩评论

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