Detect WIFI connection in Windows Store App
-
07-07-2021 - |
Question
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.
Solution
I found the solution:
now you can do something like this:
switch (internetConnectionProfile.NetworkAdapter.IanaInterfaceType)
{
case 71:
networkStatus = InternetAccess.WLAN;
break;
ect....
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow