The following sample code shows how to download an object body with the resumable transfer.
Here is what is happening in the sample code:
Create a KiiObject instance by calling the createByUri() method.
Create a KiiDownloader instance by calling the downloader() method with the file reference.
Start downloading by calling the transfer() method.
The onProgress() method will be called as the download progresses. The method can reach 100% on the first call if the data size is small.
If the download is interrupted for some reasons, it will be suspended and SuspendedException will be thrown. In this case, you can resume the download (For the steps to resume, see Resuming a Download).
You might need to get rutime permissions for accessing an external storage during the object body downloading. See Getting runtime permissions for the implementation details.