user604613
user604613

Reputation:

Detect WIFI connection in Windows Store App

I need to detect if the device my app is running on is currently connected to a WIFI network. I have read the guidance I know i can determine the "connection cost" but i specifically want to know if there is a way to tell if the device is connected to WIFI or not.

Upvotes: 3

Views: 1895

Answers (1)

user604613
user604613

Reputation:

I found the solution:

http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.connectivity.networkadapter.ianainterfacetype

now you can do something like this:

switch (internetConnectionProfile.NetworkAdapter.IanaInterfaceType)
                {
                    case 71:
                        networkStatus = InternetAccess.WLAN;
                        break;

 ect....

Upvotes: 1

Related Questions