When the user installs the application for the first time on Windows Mobile, I am creating some encryption keys to do the authentication of the application with some webservices.
The problem that I have is that the phone is autolocking and the task is canceled. I am not able to prevent it from closing.
I have used this in the mainpage.xaml load:
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; and even in the App.xaml:
private void Application_Launching(object sender, LaunchingEventArgs e) { PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } but still it is not working. Any help, please, the task is taking about 2 min.