Android Tutorial Download huge files with HttpUtils2

Discussion in 'Tutorials & Examples' started by Erel, Jun 13, 2013.

Thread Status:
Not open for further replies.
  1. DonManfred

    DonManfred Expert Licensed User

    Please start a new thread in the questionsforum for this issue.
    Make sure to upload a sample projekt which shows the issue.
     
  2. Gunnar Daehling

    Gunnar Daehling Member Licensed User

  3. DonManfred

    DonManfred Expert Licensed User

    i downloaded the sample, changed the url to yours.
    Out of three runs i got
    but it works at least....
     
  4. ibra939

    ibra939 Active Member Licensed User

     
  5. Gunnar Daehling

    Gunnar Daehling Member Licensed User

    But too often not. A download should actually always work reliably.
     
  6. DonManfred

    DonManfred Expert Licensed User

    I´ve changed the url to a file on my webspace.
    It has just finished the third download of a 101mb file successfully.

    Note that network errors can happen due to bad internet connection, other network problems.
     
  7. Gunnar Daehling

    Gunnar Daehling Member Licensed User

    I think that is not the reason. Too many users of the app report the error. Downloading this file with other apps works reliably. There are other solutions in B4A ?
     
  8. ibra939

    ibra939 Active Member Licensed User

    the file note wotking i download it show my this

    Please re-upload the file i need to check it
     

    Attached Files:

  9. ibra939

    ibra939 Active Member Licensed User


    where the new file URL we need the file to test it ???
     
  10. Gunnar Daehling

    Gunnar Daehling Member Licensed User

    The file is ok. The screenshot shows the content of the zip file. The download routine from post #1 does not work reliably.
     
  11. aidymp

    aidymp Active Member Licensed User

    Maybe I can shed some light on this, I had the same problem! i wrote an app for a client in China, the app was fine running it in the UK, they said the app did not work! download kept failing, so after lots of tests it appeared that most servers seem to stall if only for a few milliseconds, this doesn't cause any problems for most programs or web browsers however this method is seems to fail instantly. I have since switched to an expensive VPS so i get this error very rarely. But it seems to have just resurfaced but only on Apple Mac's I use the same base code for my Android, PC and Mac app, all are fine, but i am getting download failures on Macs'

    I did read there was a way to change the timeout, but its not supported with this method, maybe someone can advise if we can change the timeout on this routine?

    Thanks

    Aidy
     
  12. Gunnar Daehling

    Gunnar Daehling Member Licensed User

  13. Martin Larsen

    Martin Larsen Active Member Licensed User

    Would we be better off using the new resumable subs and the Wait For construction instead of using this library?
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    No. You need to use CountingOutputStream as done in this code.
     
  15. aidymp

    aidymp Active Member Licensed User

    Is this still current? or is there a newer method?

    Sorry I'm recreating old projects so may ask this on a few threads, as the forum is getting a little cluttered with old news!

    Thanks

    Aidy
     
  16. Erel

    Erel Administrator Staff Member Licensed User

    Posting in old threads is a good way to add clutter. Please start a new thread in the questions forum.
     
Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice