Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Honeycomb network operations
    primarykey
    data
    text
    <p>I've got this problem that I just can't seem to find a way around.</p> <p>I'm working on an Android app for Honeycomb tablets, and it needs to connect to the internet, download some data and then update the UI once it's done. The thing is, however, that I need to do this any given number of times in succession. My problem right now is that I'm using a Runnable on a new thread with a Handler that updates the UI when the network calls have been made.</p> <p>My big issue is that I cannot be sure that the data has actually been downloaded to the device yet. All I know is that the network calls are made, and that's it. I cannot be sure if anything's been downloaded.</p> <p>The big problem in my case lies in the fact that you cannot use the main thread for your network operations in Honeycomb. If I had been using the main thread, </p> <p>I'd really love some help on this subject. Thanks.</p> <p><strong>UPDATE:</strong> I'll try to explain everything a bit better:</p> <p>I've created a class that makes the network calls in a separate thread, and this class also contains a few methods that return various data from those network calls. However, the network calls can vary in length - depending on the user's network speed - so if I call one of the methods, i.e. getTitle(), I can't be sure that the network call has finished yet.</p> <p>I need to do something along the lines of this: '- Create new instance of the class (this beings a download in a new thread) - Make sure that the download has completed, so I can use the data from it - Update a progressbar'</p> <p>That's basically what I need to do. Hope it helped. Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload