'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim jhw As JhWifi
Dim timer1 As Timer
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)
jhw.Initialize()
jhw.startscan()
' Scan takes some time, so wait a minute
Log("Scan started")
timer1.Initialize("timer1", 60000)
timer1.Enabled = True
End Sub
Sub Activity_Resume
End Sub
Sub timer1_Tick
Dim n As Int
' Find strongest known network
n=jhw.StrongestKnownNetwork
Log("Strongest Network: " & n)
' Connect to network
jhw.enableNetwork(n, True)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub