RY4N
RY4N

Reputation: 1112

How to check if the user is connected to the internet wp7 ?

how do you check if the user is connected to the internet ? ive a program that uses services and i'd like to check first

thanks

Upvotes: 8

Views: 6971

Answers (2)

NER1808
NER1808

Reputation: 1969

The phone api does not have a status for internet acces. You will need to actually make a call to test whether it's available despite the various statuses. See What is the best way to check for Internet connectivity using .NET?

Upvotes: 0

Mengo
Mengo

Reputation: 210

As seen on http://www.diaryofaninja.com/blog/2010/12/09/checking-for-network-connectivity-in-windows-phone-7-sdk:

if (NetworkInterface.GetIsNetworkAvailable())
{ 

}

Should be the correct way.

Upvotes: 16

Related Questions