This issue was discussed and resolved by Gilles Debunn, an engineer at the Android group, in a blog post on Multithreading for Performance.
It already uses AsyncTask internally. Since it was created for Android, it can upload an image and install it directly on ImageView with the following two lines of code:
ImageDownloader imageDownloader = new ImageDownloader(); imageDownloader.download(url, imageView);
The ImageDownloader class can be found in the linked repository .
Konrad reiche
source share