Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Sb As SeekBar
Dim job1 As HttpJob
Dim Timer1 As Timer
End Sub
Sub Activity_Create(FirstTime As Boolean)
job1.Initialize("Job1", Me)
Activity.LoadLayout("1")
End Sub
Sub Activity_Resume
Timer1.Initialize("timer1", 100)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub JobDone (Job As HttpJob)
'Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
'print the result to the logs
' Log(Job.GetString)
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
Sub Sb_ValueChanged (Value As Int, UserChanged As Boolean)
'Send a GET request
Timer1.Enabled = True
End Sub
Sub Timer1_Tick
job1.Download2("http://192.168.0.23", Array As String("b", 2*Sb.Value))
Timer1.Enabled = False
End Sub