A file download can be suspended automatically (e.g., by network failure) or manually (e.g., by user interruption). The suspended download can later be resumed so as to continue the download from the point where it was interrupted.
The following sample code shows how to resume a suspended download.
Here is what is happening in the sample code:
Create a KiiBucket instance of the bucket that has the target KiiObject.
Create a KiiRTransferManager instance by calling the getTransferManager() method.
Get a list of KiiDownloader instances by calling the listDownloadEntries() method.
Select the KiiDownloader instance to resume, and then call the transfer() method.
Checking the status of a KiiDownloader
The above sample code gets a list of KiiDownloader instances from the KiiRTransferManager instance. You can get the status of each KiiDownloader instance.
The progress information you can get from a KiiDownloader instance includes the bytes transferred, the bytes in total, and the status (e.g., ongoing or suspended). See Checking the status of a KiiUploader to learn how to get the information.