Android Question Can anyone test if my code to get SSID runs under Android 9?

welu1805

Active Member
Licensed User
Longtime User
Hi all,

attached is an app to get the SSID and the network Id of the connected network. It works until Android 8.1. Unfortunately I have no device with Android 9!

Can anyone test if my code runs under Android 9 and what are the return values?

Thanx
Lutz
 

Attachments

  • TestSSIDAndroid9.zip
    7.7 KB · Views: 115
Last edited:

welu1805

Active Member
Licensed User
Longtime User
Thank you very much.

The docu of getCofiguredNetworks is probably incomplete. This is the docu:

getConfiguredNetworks
added in API level 1
public List<WifiConfiguration> getConfiguredNetworks ()
Return a list of all the networks configured for the current foreground user. Not all fields of WifiConfiguration are returned. Only the following fields are filled in:

  • networkId
  • SSID
  • BSSID
  • priority
  • allowedProtocols
  • allowedKeyManagement
  • allowedAuthAlgorithms
  • allowedPairwiseCiphers
  • allowedGroupCiphers
Returns
List<WifiConfiguration> a list of network configurations in the form of a list of WifiConfiguration objects.

I use the field "status" which is not in the list above. But it seems to be filled!

As permission in the manifest is needed AddPermission("android.permission.ACCESS_WIFI_STATE"), no runtime permission nessecary!

Lutz
 
Upvote 0

welu1805

Active Member
Licensed User
Longtime User
Thank you very much.

The docu of getCofiguredNetworks is probably incomplete. This is the docu:

getConfiguredNetworks
added in API level 1
public List<WifiConfiguration> getConfiguredNetworks ()
Return a list of all the networks configured for the current foreground user. Not all fields of WifiConfiguration are returned. Only the following fields are filled in:

  • networkId
  • SSID
  • BSSID
  • priority
  • allowedProtocols
  • allowedKeyManagement
  • allowedAuthAlgorithms
  • allowedPairwiseCiphers
  • allowedGroupCiphers
Returns
List<WifiConfiguration> a list of network configurations in the form of a list of WifiConfiguration objects.

I use the field "status" which is not in the list above. But it seems to be filled!

As permission in the manifest is needed AddPermission("android.permission.ACCESS_WIFI_STATE"), no runtime permission nessecary!

Lutz

Now I have an Android 9 phone (XIAOMI MI 9T PRO) with Androidversion: 9 PKQ1.181121.001
The code above don't work further. The field "status" is NOT filled.
 
Upvote 0
Top