...
Context.InitializeContext
Wifi = Context.RunMethod("getSystemService", Array("wifi"))
...
' if available and suplicantState "COMPLETED" return SSID
' if available and suplicantState <> "COMPLETED" return "not completed"
' if wifi is not enabled, Return "unknown ssid"
Public Sub returnActSSID As String
Dim SSID, state As String
Dim jo As JavaObject
jo = Wifi.RunMethodJO("getConnectionInfo", Null)
SSID = jo.RunMethod("getSSID", Null)
state = jo.RunMethod("getSupplicantState", Null)
If SSID <> "unknown ssid" Then
If state <> "COMPLETED" Then
SSID = "not completed"
End If
End If
Return SSID
End Sub