I want to use timer for http job. For example I will set it to 5 seconds and http job will be done every 5 seconds if I enable timer. If I disable timer http job will stop. How can I do this?
B4X:
Dim Job1 As HttpJob
Job1.Initialize("MyJob", Me)
Job1.Download2("http://www.xxx.com/yyy.php", Array As String("x", "y"))
Sub JobDone (Job As HttpJob)
Log("Job completed: " & Job.Success)
Job.Release
End Sub
Even not if it is the solution? I provided a link to the documentation! There you can see a codesnippet and a description how to work with timer.
If this dont help you....
But OK, don´t expect me to want to help you anymore.
When you type timer1. And click on initialize for example you can see the example.
While initializing you must set the interval. Later you can changw it via timer1.interval = 1000
1000means 1 second. You must set 5000 for 5 seconds. Later under sub timer1_tick tou can type what you want. Tou can use b4x object browser to help yourself or use the beginners guide as donmanfred suggested