ImageDownloader¶
-
public class
ImageDownloader
¶ This class provides utility methods for downloading, storing and loading images from/to the internal storage. Note that the image downloading process is asynchronous, so it uses the interface
ImageDownloader.IBitmapReceiver
for notifying the user about the downloading outcomes.
Fields¶
receiver¶
-
IBitmapReceiver
receiver
¶
Constructors¶
ImageDownloader¶
-
public
ImageDownloader
(IBitmapReceiver receiver, Context ctx, String username, String password)¶ This class handles asynchronous image downloads. Once a image has been successfully downloaded, it calls the method
ImageDownloader.IBitmapReceiver.onBitmapReady(Bitmap)
}Parameters: - receiver – the object that will receive the downloaded image
- ctx – the activity context
- username – the user name (needed for authentication)
- password – the password (needed for authentication)
Methods¶
deleteInternalFile¶
downloadImage¶
getInternalImages¶
getInternalImages¶
loadImageFromInternalStorage¶
-
public void
loadImageFromInternalStorage
(String filename)¶ Loads an image from the internal storage. The loaded bitmap will be sent to the callback method
IBitmapReceiver.onBitmapDownloaded(ImageDownloader,Bitmap)
Parameters: - filename – the name of the file to load