Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要检测运行我的应用程序的设备当前是否连接到 WIFI 网络。我已阅读指南,我知道我可以确定“连接成本”,但我特别想知道是否有办法判断设备是否连接到 WIFI。
我找到了解决方案:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.connectivity.networkadapter.ianainterfacetype
现在你可以做这样的事情:
switch (internetConnectionProfile.NetworkAdapter.IanaInterfaceType) { case 71: networkStatus = InternetAccess.WLAN; break; ect....