我一直使用https://github.com/parsonsmatt/WifiWizard在iOS和Android上获取Wifi信息(特别是连接的SSID),这很棒。该插件不支持Windows / Windows Phone,但是,有什么方法可以在Windows或Windows Phone上看到连接的Wifi SSID的名称吗?
function getWifiSsid() {
if (device.platform === 'windows') {
let profile = Windows.Networking.Connectivity.NetworkInformation.getInternetConnectionProfile();
if (!profile) {
throw 'No network connected';
}
if (profile.isWlanConnectionProfile && profile.wlanConnectionProfileDetails) {
return profile.wlanConnectionProfileDetails.getConnectedSsid();
} else {
throw 'Wlan not connected';
}
} else {
// todo
}
}