I've got an app that can switch to different WiFi networks by scanning a QR code. Works fine in iOS with hotspot, and various android devices. But I've got a Samsung galaxy 10 note + here that's working differently. For one, WifiManager.AddNetwork works just fine and I get a good network ID back from it. But it won't switch to that network automatically. I have to go into the wifi settings and switch it manually. It doesn't ask for a password when I do this, so I know AddNetwork is working. Calling EnableNetwork doesn't help either. And two, WifiManager.ConnectionInfo.NetworkId always returns -1. Even if I am connected to a perfectly working access point, it's still -1. So even if it did switch to the network properly, I have no way of knowing. I know in iOS they don't let you do things like read your MAC. Since this is a recent device, did android maybe institute new security to prevent you from reading the current network? Is there perhaps a different way to determine the current network ID? This device is driving me nuts here.
↧