Android Question Why doesn't the Progress bar display with httpUtils2

Arun

Member
Licensed User
Longtime User
Hi

I am using httpUtils2 library to download about 200 small files, each of 1-2 kb, in a loop which has been successfully tested.

I want to display a progress bar for the downloads, and I cant seem to get it to work.

I tried adding the ProgressBar as a view in the Designer, I tried adding it directly to the activity and then using Activity.AddView, but no success.

I have set pbValue as int to 0 before i start the download loop.
In the JobDone event, i increment this value by 1 and set ProgressBar.progress = pbValue (I also use this variable to check that all downloads have been completed)

I have already gone thru all the examples, questions, tutorials, alternatives but could not find anything suitable, even after adapting the various alternatives (FTP Progress Bar, Download Service etc, etc)

Thanks in advance

Regards
 

DonManfred

Expert
Licensed User
Longtime User
Without seeing our code we just can GUESS what you did and how.
Create a small project which shows the problem and export the project as zip (In B4A IDE: File->Export as zip) and upload it here.

A simple httputils-call will not raise any progress-update-events.
Asuming you are using a global list for the download to track.
This should work if you do it right. But again: Without seeing our code we just can GUESS what you did and how.
 
Upvote 0

Arun

Member
Licensed User
Longtime User
Thanks for the quick reply.

I will create a new project with the relevant portions from my code and upload the zip tomorrow.
 
Upvote 0

Arun

Member
Licensed User
Longtime User
I have uploaded my project (with links and file names suppressed).

The files get downloaded and the app is working perfectly.

I wanted to introduce the progress bar since the process needs to wait till all the files are downloaded and the user should have an indication of the download status.

Thanks again in advance
 

Attachments

  • MultiFileDownload.zip
    7.2 KB · Views: 258
Upvote 0

Cüneyt Gargin

Member
Licensed User
Longtime User
I have the same problem... I download around 20 small files to download via FTP. But since FTP is working asynchronous, even I change progress bar value in FTP_DownloadProgress and FTP_DownloadComplete, it does not react.. I put DoEvents to repaint UI , but it does not work either..
 
Upvote 0
Top