Android Question B4A not showing SSID

Nitin Joshi

Active Member
Licensed User
My project is showing SSID <unknown SSID>. Can anyone help to know the reason?

I have attached the project for the reference.


Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

Dim WiFi As MLwifi
'Dim WiFiScan As MLScan
Public myTempIP, mySSID, myPassword As String
Private rp As RuntimePermissions
End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private Label1 As Label
Private Label2 As Label
Private Label3 As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)

If FirstTime Then
' pscal
Activity.LoadLayout ("Home_Screen")
If WiFi.isWifiConnected And WiFi.WifiSSID="Mumbai Indians" Then
Label3.Text="Condition matched"
Label3.Text="Condition not matched"
End If

End If
End Sub

/Code end


  • Sample
    9.8 KB · Views: 248


Licensed User
Longtime User
1. You got told a few times to use code tags when posting code.
Please do it.
Please use [CODE]code here...[/CODE] tags when posting code.




2. Use the forumsearch. This issue is handled a few times.
Upvote 0

Nitin Joshi

Active Member
Licensed User
Dear, Thanks for educating me....

I found that location must be ON to show the SSID. However, can we get SSID keeping location OFF? or its must to keep location ON?
Upvote 0


Active Member
Licensed User
Longtime User

Restricted access to Wi-Fi location and connection information

In Android 9, the permission requirements for an app to perform Wi-Fi scans are more strict than in previous versions. For details, see Wi-Fi scanning restrictions.

Similar restrictions also apply to the getConnectionInfo() method, which returns a WifiInfo object describing the current Wi-Fi connection. You can only use this object's methods to retrieve SSID and BSSID values if the calling app has the following permissions:

Retrieving the SSID or BSSID also requires location services to be enabled on the device (under Settings > Location).

Information removed from Wi-Fi service methods
In Android 9, the following events and broadcasts don't receive information about the user's location or personally identifiable data:

The NETWORK_STATE_CHANGED_ACTION system broadcast from Wi-Fi no longer contains SSID (previously EXTRA_SSID), BSSID (previously EXTRA_BSSID), or connection information (previously EXTRA_NETWORK_INFO). If your app needs this information, call getConnectionInfo() instead.

Upvote 0