0

The method to getConfiguredNetworks has now been deprecated in Android Q. I was using this feature in order to determine whether a Wifi network has any security such as WifiConfiguration.KeyMgmt.WPA_EAP. All of these are now deprecated and i am not sure whether there is any alternative. Google suggests to use WifiNetworkSpecifier.Builder#build() but this is for connecting to new network, not for my use case.

Denominator
  • 196
  • 1
  • 11

1 Answers1

0

WiFi scanning allows you to get the list of networks in range.

Then you can parse ScanResult.capabilities, which should - among others - contain the encryption info of the network (WPA/WPA2/etc). Granted, it would be more convenient to have a proper object rather than a string, but here we are.

Thore
  • 322
  • 2
  • 10