Windows Phone 7 (Mango) Tutorial - 27 - How to Detect whether the Network is Available? - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Sunday, July 10, 2011

Windows Phone 7 (Mango) Tutorial - 27 - How to Detect whether the Network is Available?

Sometime we need to know whether Network connectivity is available or not from our application. In Windows Phone 7, we have the required API exposed for the developers to detect the status of the network connection and take respective step based on that.   So how to detect it? In this small tip of the tutorial series, we will learn about the API and we will also see how this can be done using a small demo which includes code too. Read to know more about it.   Index - Windows Phone 7 (Mango) Tutorial   Know about the APIs Let's discuss about the API first. NetworkInterface class present inside the Microsoft.Phone.Net.NetworkInformation namespace is responsible to inform you whether the network connection is available or not. NetworkInterface class has a method called GetIsNetworkAvailable(). Once called it will return boolean value true or false based on the current network availability.   Microsoft.Phone.Net.NetworkInformation.NetworkInterface...

No comments:

Post a Comment