Jamey McElveen
Jamey McElveen

Reputation: 18305

How can I detect network connectivity in Windows Phone 7?

How can I detect network connectivity in Windows Phone 7? Is there a simple API for that?

Upvotes: 7

Views: 2960

Answers (4)

onmyway133
onmyway133

Reputation: 48175

Consider using NetworkInformation.DeviceNetworkInformation.IsNetworkAvailable

in Microsoft.Phone.Net namespace

Upvotes: 0

Rama
Rama

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

Jamey McElveen
Jamey McElveen

Reputation: 18305

I found it :-P

System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

Thanks guys you pointed me in the right direction.

Upvotes: 13

Vinay B R
Vinay B R

Reputation: 8421

Try NetworkChange.NetworkAddressChange event in System.Net.NetworkInformation namesapce.

Checkout this blog for implementation details.

Upvotes: 1

Related Questions