B4J Question [Solved] Download Files from server with progress

Dadaista

Active Member
Licensed User
Longtime User
Hi all
How can I do something like this
from B4J?
 

johnaaronrose

Active Member
Licensed User
Longtime User
I have my smallish app for an https download almost working as per Erel's coding. However, after my app has finished downloading & copying the file successfully to Internal Storage, it then seems to start again: i.e. it invokes the Track Progress sub in an endless loop without doing any more downloading (it shows 0 bytes downloaded repeatedly). I'm wondering if line 28 (in post#1) - Wait For (j) JobDone (j As HttpJob) - is causing the problem. Why does JobDone not appear anywhere else in the coding?
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Hi there...

I want to have to downloadprogress in the same sub... files downloading ok.. but second download not show the progress...

B4X:
        Wait For (DownloadAndTrackProgress("https://www.mysite.com/myfile.ver", "myfile.ver")) Complete (Success1 As Boolean)
        If Success1 Then
         
            
                ProgressBar1.Progress=0
             
                     
                Wait For (DownloadAndTrackProgress("https://www.mysite.com/mysecondfile.txt", "mysecondfile.txt")) Complete (success As Boolean)
                If success Then
...

Thought if "success" was different will be ok... but it is not the problem... seems that second time in row - can't get "taskid"... but why ?

moving to new question... sorry
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…