My app is a GPS tracker and I want to keep it running while the screen is locked or idle.
In order to do this I do the following:
using Microsoft.Phone.Shell;
...
PhoneApplicationService.Current.ApplicationIdleDetectionMode =
IdleDetectionMode.Disabled;
PhoneApplicationService.Current.UserIdleDetectionMode =
IdleDetectionMode.Disabled;
This works ok, but It seems that the WiFi gets disconnected after a while. Is this normal? Is there a way to keep it alive?
There isnt any way of preventing it from disconnecting when the screen locks. Its one of the behaviors of the os that isnt exposed to developers.