Answered by:
Will Service Calls be made in NetworkStatusChanged Event when app is in Suspend State?

Question
-
Hi,
In my app, I am using following code for detecting network change.
NetworkInformation.NetworkStatusChanged += NetworkInformation_NetworkStatusChanged;
In NetworkInformation_NetworkStatusChanged event handler, I need to call a webservice ,when app is in suspend state and network is available.Is it possible ?
Thursday, September 12, 2013 6:43 AM
Answers
-
No, What you will want to use is a trigger for a background task.
http://www.microsoft.com/en-us/download/details.aspx?id=28999
Jeff Sanders (MSFT)
@jsandersrocks - Windows Store Developer Solutions @WSDevSol
Getting Started With Windows Azure Mobile Services development? Click here
Getting Started With Windows Phone or Store app development? Click here
My Team Blog: Windows Store & Phone Developer Solutions
My Blog: Http Client Protocol Issues (and other fun stuff I support)- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Thursday, September 12, 2013 7:10 PM
- Marked as answer by Jamles HezModerator Wednesday, September 18, 2013 6:51 AM
Thursday, September 12, 2013 7:10 PMModerator -
You can respond to the system triggers specified on this page:
http://msdn.microsoft.com/en-http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.background.systemtriggertype.aspxNetworkStateChange is one of the events that can trigger a background task.
Please also see http://msdn.microsoft.com/en-us/library/windows/apps/jj160503.aspx
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.- Marked as answer by Jamles HezModerator Wednesday, September 18, 2013 6:51 AM
Thursday, September 12, 2013 7:13 PMModerator
All replies
-
No, What you will want to use is a trigger for a background task.
http://www.microsoft.com/en-us/download/details.aspx?id=28999
Jeff Sanders (MSFT)
@jsandersrocks - Windows Store Developer Solutions @WSDevSol
Getting Started With Windows Azure Mobile Services development? Click here
Getting Started With Windows Phone or Store app development? Click here
My Team Blog: Windows Store & Phone Developer Solutions
My Blog: Http Client Protocol Issues (and other fun stuff I support)- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Thursday, September 12, 2013 7:10 PM
- Marked as answer by Jamles HezModerator Wednesday, September 18, 2013 6:51 AM
Thursday, September 12, 2013 7:10 PMModerator -
You can respond to the system triggers specified on this page:
http://msdn.microsoft.com/en-http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.background.systemtriggertype.aspxNetworkStateChange is one of the events that can trigger a background task.
Please also see http://msdn.microsoft.com/en-us/library/windows/apps/jj160503.aspx
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.- Marked as answer by Jamles HezModerator Wednesday, September 18, 2013 6:51 AM
Thursday, September 12, 2013 7:13 PMModerator