WiFiAdapter.Connect not working in update

Since the update the WIFI code is not working:

 var connectionResult = await Device.WiFiAdapter.Connect(Secrets.WIFI_NAME, Secrets.WIFI_PASSWORD);
            if (connectionResult.ConnectionStatus != ConnectionStatus.Success)
                throw new Exception($"Cannot connect to network: {connectionResult.ConnectionStatus}");

I’m looking through the documents and I’m not seeing any updates for the code. The Device.WiFiAdapter is throwing an error. How is this done now?

Have you checked out the latest sample to see how the API has changed?


I have not. This is what I was looking for. Thank you so much!

I am running FeatherV2 and using RC1 and it is all working for me. The API did change so you will need to change a bit of your calls from 6.4.

The big difference I see is the ScanForNetworks…
Is that required?

Scan for networks is not required. It is there in the same to show that you can scan for access points without being connected to an access point.

There is a major change to the way WiFi adapters are dealt with from beta 0.6.4 to RC-1.