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 JavaObject
Dim context As JavaObject
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.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_COARSE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
context.InitializeContext
Wifi = context.RunMethod("getSystemService", Array("wifi"))
Dim SSID, state As String
Dim jo As JavaObject
jo = Wifi.RunMethodJO("getConnectionInfo", Null)
state = jo.RunMethod("getSupplicantState", Null)
If state = "COMPLETED" Then
SSID = jo.RunMethod("getSSID", Null)
Msgbox(state, SSID)
Else
Msgbox("Not COMPLETED", "state")
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
End Sub