Reputation: 18305
How can I detect network connectivity in Windows Phone 7? Is there a simple API for that?
Upvotes: 7
Views: 2960
Reputation: 48175
Consider using NetworkInformation.DeviceNetworkInformation.IsNetworkAvailable
in Microsoft.Phone.Net namespace
Upvotes: 0
Reputation: 143
It's available in the System.Net.NetworkInformation.NetworkInterface class as provided the below link http://msdn.microsoft.com/en-us/library/system.net.networkinformation.networkinterface.aspx
Upvotes: 0
Reputation: 18305
I found it :-P
System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(
);
Thanks guys you pointed me in the right direction.
Upvotes: 13
Reputation: 8421
Try NetworkChange.NetworkAddressChange event in System.Net.NetworkInformation namesapce.
Checkout this blog for implementation details.
Upvotes: 1