Reputation: 5104
I have created an app in which I want the app to run under lock screen and it involves navigating between pages. The issue is, it gives me an error "cannot navigate under lock screen". Is there a workaround for it?
Upvotes: 3
Views: 575
Reputation: 718
Yes Milan, We're talking about the same events, but in my case it hits the break-points as well as gives proper event name in Output window. I've used following code:
private void Application_Launching(object sender, LaunchingEventArgs e)
{
System.Diagnostics.Debug.WriteLine("App Launching");
}
private void Application_Activated(object sender, ActivatedEventArgs e)
{
System.Diagnostics.Debug.WriteLine("App Activated");
}
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
System.Diagnostics.Debug.WriteLine("App Deactived");
}
private void Application_Closing(object sender, ClosingEventArgs e)
{
System.Diagnostics.Debug.WriteLine("App Closing");
}
I hope it helps. Let me know if still there is any issue.
Upvotes: 0
Reputation: 718
Unfortunately, when phone is locked, your app goes in background (if you're using background services) or gets deactivated. In this case page-navigation OR UI related tasks can't be performed. You may, however, run background tasks.
Upvotes: 3