Hello,
I have a local database (SQLite) capturing GPS coordinates from time to time. When the user is whether close to its WiFi router or have 3G reception I call a service to make the batch process of posting each pair of coordinates to the server and the asp page returns a number previously posted by the tablet that is the the key of the register inside the SQLite database, so the android knows that the data has been successfully posted to the server and now it can be deleted locally where cod = job.getstring.
Below there's the structure, not actually the real code.
The problem is that I might have more than 400 registers to be posted one by one in order to populate the database in the server side but I cannot handle these requests correctly which cause the android to post 400 registers in a row without the response from the server.
Is there a way to create something like a job array or handle the independently ?
Thanks in advance!
I have a local database (SQLite) capturing GPS coordinates from time to time. When the user is whether close to its WiFi router or have 3G reception I call a service to make the batch process of posting each pair of coordinates to the server and the asp page returns a number previously posted by the tablet that is the the key of the register inside the SQLite database, so the android knows that the data has been successfully posted to the server and now it can be deleted locally where cod = job.getstring.
Below there's the structure, not actually the real code.
B4X:
job.Initialize("Job", Me)
for i = 0 to recordset.rowcount - 1
rs.position = i
job.PostString("192.168.0.1/check.asp?", "lat=" & rs.getstring("lat") & "&lng=" & rs.getstring("lng") & "cod=" & rs.getstring("cod") -- rs is the record set from a select * from table
next
If Job.Success = True then
If Job.Jobname = "Job" then
SQL.ExecuteNonQuery ("DELETE FROM table WHERE cod = " & job.getstring)
end if
end if
The problem is that I might have more than 400 registers to be posted one by one in order to populate the database in the server side but I cannot handle these requests correctly which cause the android to post 400 registers in a row without the response from the server.
Is there a way to create something like a job array or handle the independently ?
Thanks in advance!
Last edited: