XNA game keeps shutting down because the phone 'sleeps'
Is there a way to programatically stop the phone fr开发者_运维问答om sleeping? Since my game doesn't involve touching the screen, it won't stay active more than a few seconds.
Something like this would probably do it:
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
Note the warning in the docs, however, as this is a bit battery-unfriendly.
精彩评论