Whenever I debug my windows phone app, whether it be on my phone or emulator I always get this Exception. How can I resolve this issue?
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
I'm still a beginner with this.
I've had same issue. Clearing the \bin and \obj folders and then recompile solved it for me.
That's not a exception.
What I guess is the exception, is that the PhoneApplicationService
isn't created. So you're getting a NullReferenceException
.
Either add PhoneApplicationService = new PhoneApplicationService()
on the line above, or ensure following XAML are in your App.xaml
<Application.ApplicationLifetimeObjects>
<!--Required object that handles lifetime events for the application-->
<shell:PhoneApplicationService
Launching="Application_Launching" Closing="Application_Closing"
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
</Application.ApplicationLifetimeObjects>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With