Is there an easier quick way to determine if a device (Windows Phone 7) has an internet connection

Is there an easier way to determine if your device (Windows Phone 7) has an Internet connection.

I am currently submitting a web request, waiting for a waiting period and handling the exception. We hope for a quick way to request a device to find out if it has a connection before sending any requests ...

Thanks in advance,

+7
windows-phone-7
source share
2 answers

This method returns NetworkInterfaceType.None if there is no connection.

NetworkInterface.GetInternetInterfaceType

Alternatively, you will get NetworkInterfaceType.MobileBroadbandGSM, NetworkInterfaceType.Wireless80211 etc. if there is a connection.

+8
source share

In fact, there is no faster way, although instead, if you do not want to use this dummy query, you can probably make a request for the data you want, so if it returns, you can process the data without doing the second request.

+4
source share

All Articles