It seems I am not getting the latest file to download from the web.
I use B4A 6.00 and Library OkHttpUtils2 (version 2.2)
Code (extracted) is:
Sub Globals
...
Private job1 As HttpJob
...
End Sub
Sub Activity_Create(FirstTime As Boolean)
...
job1.Initialize("job1",Me)
job1.Download("http://www.{my url}/testfile.csv")
...
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "job1"
Dim out As OutputStream
File.Delete(File.DirDefaultExternal,"testfile.csv")
out = File.OpenOutput(File.DirDefaultExternal,"testfile.csv",True)
File.Copy2(Job.GetInputStream, out)
out.Close
End Select
Else
Log("Error: " & Job.ErrorMessage)
Job.Release
Return
End If
Job.Release
' some code here to read the csv file and create a map...
End Sub
If I change the contents of testfile.csv and upload it, overwriting the old one, the code runs fine, but when I open testfile.csv on the device, it is still the old contents.
If I reboot the device and do it again, the correct file is downloaded.
It seems that the file is downloaded from cache and not directly from the web.
How can I force the file to NOT use the cache, and always download from the web?
Thanks for any help!