Android Question job.complete confusion

rayellam

Member
Licensed User
Longtime User
Pseudo code...........I have 48 individuallynamedd jobs all firered in a sequential order 250ms apart. the data passed back from the server is around 1kb for each individual job.

dim job 1 as HttpJob (48 jobs 1 to 48)
dim url1 as string (48 different url's)

Sub send request
job1.Initialize("Job1", Me)
job1.download(url1)
job1.GetRequest.Timeout = jobTimeOut
end sub

Sub JobDone(job AsHttpJob)
If job.Success = True Then
Select job.JobName
Case"Job1"
‘Do some stuff on the job job.Complete(job1)???????????????????????????????????
job1.release ????????????????????????????????????????
end sub

Questions
1. What is the parameter in the brackekets of job1.complete, the pop up help says it's an int but it compiles with a string????????????
2. Where should job release be called from?

Very confused by this as the documentation tells you ZERO

Cheers
Ray
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please use [ code ] [ /code ] tags (without spaces) when posting code.

Very confused by this as the documentation tells you ZERO
HttpUtils2 is explained here: http://www.b4x.com/android/forum/threads/httputils2-web-services-are-now-even-simpler.18992/#content

As you can see there is no mention of job.Complete as you do not need to call it. Job.Complete is documented here: http://www.b4x.com/android/help/httputils2.html#httpjob_complete

It is called internally by the service.

You should call Job.Release when you are done working with the job. Usually at the end of JobDone.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…