Hi, i’m doing a game to both android and IOs platforms, and i need to know if the users is connected to a certain WiFi, i can know if the user is conected to a WiFi using
`if(Application.internetReachability==NetworkReachability.ReachableViaLocalAreaNetwork)`
but i need to know more info about that WiFi, overall the name of the WiFi, how can it be done in C#?
Thanks in advance.
[EDIT]
Now i’m using [Managed WiFi Api][1], in the PC I can get the WiFi name using:
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using NativeWifi;
public void InterfacesNetwork(){
WlanClient wlan = new WlanClient();
List<string> connectedSsids = new List<string>();
foreach (WlanClient.WlanInterface wlanInterface in wlan.Interfaces)
{
Wlan.Dot11Ssid ssid = wlanInterface.CurrentConnection.wlanAssociationAttributes.dot11Ssid;
//connectedSsids.Add(new String(Encoding.ASCII.GetChars(ssid.SSID,0, (int)ssid.SSIDLength)));
Debug.Log("ssid en string: "+ssid.ToString());
Debug.Log(ssid.SSID.ToString());
}
foreach(WlanClient.WlanInterface wlanIface in wlan.Interfaces){
foreach(Wlan.WlanProfileInfo profileinfo in wlanIface.GetProfiles()){
Debug.Log("nombre red: "+profileinfo.profileName);
}
}
}
But when I try it on Android give me an error:
i’ve tried downloading and adding the DLL, but it’s still the same.
Any one has a clue?
thaks!!
[1]: http://managedwifi.codeplex.com/