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
精彩评论