I’m developing an application that gets large images from an Internet server which is the best way to download this images, without freeze the entire application? I mean background download. I have thought about download it in another thread.
I’m developing an application that gets large images from an Internet server which is
Share
Yes, you need to spawn another thread to do the network communication, and then when it is finished doing it’s reading, you can use a volatile boolean flag to indicate that the work is complete and the main/application thread can take the data and incorporate it. The data may be ‘part’ of an image if you want to show the image coming in piece by piece (as a browser does).