httputils2 download file

iCAB

Well-Known Member
Licensed User
Longtime User
Hi There

I am trying to use httputils2 to download a file, then use the corresponding intent to open the file

B4X:
Sub Service_Create
   TempFolder = File.DirInternalCache
   hc.Initialize("hc")
   TaskIdToJob.Initialize
End Sub

Call issued to download file

B4X:
Job.Download("http://www.b4x.com/forum/images/categories/android.png")


Job returns success

But if I try to locate the file using the code below I cannot
B4X:
If File.Exists(File.DirInternalCache, "android.png") = True Then

Can someone tell me what I am doing wrong in here

Thanks in advance
 

iCAB

Well-Known Member
Licensed User
Longtime User
Hi Erel
I was just giving the above as an example. I was looking actually to download and open a pdf file.

Thanks for the reply, it works like a charm
 
Upvote 0

Ferdari

Active Member
Licensed User
Longtime User
any example erel?

One question:
My app starts downloading images, but every time it needs to re-download every image again when restarting my app, how do i store every image for later use?

im using httputils2 too
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…