bharat
bharat

Reputation: 51

how to make WP7 app not to go lock mode as the device is set to go lock for every 30 sec?

I mean app should run even in lock mode without going back to lock mode?

Upvotes: 2

Views: 616

Answers (3)

Santhu
Santhu

Reputation: 1525

Can you try by adding following code in App.xaml.cs file public App() constructor

Microsoft.Phone.Shell.PhoneApplicationService.Current.UserIdleDetectionMode = Microsoft.Phone.Shell.IdleDetectionMode.Disabled;
            Microsoft.Phone.Shell.PhoneApplicationService.Current.ApplicationIdleDetectionMode = Microsoft.Phone.Shell.IdleDetectionMode.Disabled;

This statement Microsoft.Phone.Shell.PhoneApplicationService.Current.UserIdleDetectionMode = Microsoft.Phone.Shell.IdleDetectionMode.Disabled; of disabling 'UserIdleDetectionMode' property makes operating system to not to go into idle mode(low power usage state).

This is required in addition 'ApplicationIdleDetectionMode' property disabling, if your application needs to continue running even when the user is not physically interacting with the screen or hardware buttons.

Upvotes: 0

Ku6opr
Ku6opr

Reputation: 8126

Look to the Idle Detection for Windows Phone, especially to User Idle Detection Mode section

Upvotes: 1

Related Questions