You can ask a URLConnection for the content length and then read from the content stream in chunks.
You can display your progress by setting the max to the content length and then incrementing the progress by your read chunk size. On May 26, 1:21 pm, Sukitha Udugamasooriya <[email protected]> wrote: > Hi, > > I m implementing a small app which downloads files (avg 1MB files- > takes 5 seconds to download). > --> I want to show the progress using a ProgressBar. > -->The user can pause the download if he desires. > > How can I show the progress? (How can I know the amount that has > downloaded at a given moment?) > > Thank you. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

