I iCAB Well-Known Member Licensed User Longtime User May 10, 2013 #1 Hi There I am trying to use httputils2 to download a file, then use the corresponding intent to open the file Code: Copy Sub Service_Create TempFolder = File.DirInternalCache hc.Initialize("hc") TaskIdToJob.Initialize End Sub Call issued to download file Code: Copy 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 Code: Copy If File.Exists(File.DirInternalCache, "android.png") = True Then Can someone tell me what I am doing wrong in here Thanks in advance
Hi There I am trying to use httputils2 to download a file, then use the corresponding intent to open the file Code: Copy Sub Service_Create TempFolder = File.DirInternalCache hc.Initialize("hc") TaskIdToJob.Initialize End Sub Call issued to download file Code: Copy 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 Code: Copy If File.Exists(File.DirInternalCache, "android.png") = True Then Can someone tell me what I am doing wrong in here Thanks in advance
Erel B4X founder Staff member Licensed User Longtime User May 11, 2013 #2 (moved thread to questions forum). You do not need to change HttpUtils2 code. HttpUtils2 uses temporary files. Do you want to show this image? If yes then you should use Job.GetBitmap. If you want to store the file then you should use File.Copy2 with Job.GetInputStream. Upvote 0
(moved thread to questions forum). You do not need to change HttpUtils2 code. HttpUtils2 uses temporary files. Do you want to show this image? If yes then you should use Job.GetBitmap. If you want to store the file then you should use File.Copy2 with Job.GetInputStream.
I iCAB Well-Known Member Licensed User Longtime User May 11, 2013 #3 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
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
Ferdari Active Member Licensed User Longtime User May 23, 2014 #4 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: May 23, 2014 Upvote 0
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
Erel B4X founder Staff member Licensed User Longtime User May 23, 2014 #5 HttpUtils - Android web services are now simple! Upvote 0