Android Question ProgressDialog question...

Discussion in 'Android Questions' started by kepler, May 2, 2015.

  1. kepler

    kepler Active Member Licensed User

    Hi,

    Today is not my day....

    I'm using a ProgressDialog to monitor one of my routines in the Main project.


    Problem: the routine calls another routine in a Code module. So...the Progress wheel freezes. And I can't seem to call the bar in the code module.+

    Can't figure a way out of this....

    Kind regards,

    Kepler
     
  2. NJDude

    NJDude Expert Licensed User

    If it freezes it means there's a long process holding the main thread, you could add a DoEvents, that might help.
     
  3. kepler

    kepler Active Member Licensed User

    I think I've found where the program is freezing. It's in a Job.GetString line.

    Any way to get around this?

    Kind regards,

    Kepler
     
  4. DonManfred

    DonManfred Expert Licensed User

    What are you doing with the job.getstring? How long is the content you are getting?
     
  5. kepler

    kepler Active Member Licensed User

    I'm downloading some text data from a server. After the download, I use GetString to retrive the data.
    The size varies - 50kb to 500kb.

    Regards,

    Kepler
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Which data are you reading? What are you doing with this string?
     
  7. kepler

    kepler Active Member Licensed User

    Hi,

    It's a return search from my astronomy website, that calculates some astronomical data. I pull that info and treat it in the app.
    The job is very fast - I can see that in the log. But getting the string from the download, it's a little delayed.

    Kind regards,

    Kepler
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Loading a 0.5M characters string can be a slow operation. Do you really need to load everything?
     
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