I spent an hour googling and everything I see boils down to a simple code:
var wifiManager = ApplicationContext.GetSystemService(Context.WifiService).JavaCast<WifiManager>();
WifiConfiguration conf = new WifiConfiguration() { Ssid = @"""ssid""", PreSharedKey = @"""passw""" };
var id = wifiManager.AddNetwork(conf);
var enabled = wifiManager.EnableNetwork(id, true);
if i set ssid/password to a WiFi which is in the list on my Android phone the id is -1 and nothing happens.
if i set those to a fictitious values like abc/abc I get a realistic id.
so I am not sure - what is the purpose of this code in real-life if you cannot connect to an existing Wi-Fi ?
how do i connect to an 'existing' Wi-Fi in API level 29+? (by existing - I mean the phone has it stored in the list and it is currently visible in Wi-Fi scan)
What I really want is to switch to another Wi-Fi in my home when I move from one room to another
Xamarin.Forms 4.5 | Android 10.0