Android Question BATCH Upload with jobX.Download2

Discussion in 'Android Questions' started by kohle, Mar 27, 2015.

  1. kohle

    kohle Active Member Licensed User


    I use the following code

    Dim job2 As HttpJob
    job2.Initialize("Job2", Me)

    This works fine , I get an success info in JobDone

    Now I need to do this about 50 times with different data. I have the data in a list.
    When successfully a job2.Download2 was made, I want to delete the item from my list
    and make the next job2.Download2.
    When not successfully than stop.

    How I can do this ?

  2. DonManfred

    DonManfred Expert Licensed User

    Start the first job
    In JobDone you check if the upload was ok or not. when ok you remove the first job from your list and then start the first job of the list (if there is a entry in the list)

    BUT if we just talking about data (no binaries) then you can use multiple dataentries in ONE postrequest...

    See my example on Creating an dynamic pdf using b4a<->php

    You can see the principle i´m using there...
    I have a list of Maps and post all this in one request tot the php and the php extracts the list and get the maps out of it.

    So, instead of 50 calls you can use one call (if you php is designed to accept this) to transmit all.
    mangojack likes this.
  3. kohle

    kohle Active Member Licensed User

    Thanks a lot DonManfred,
    the first idea, I had too, but had an error in my script in the jobdone event (Missing RETURN) . Now it works fine.

    Using JSON is a way, I will check.
  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