Download Contents

You can download contents zip_file through REST API, using each content download URL. For the zip_file URL, you need to request a signed URL first.

The signed URL can be generated through ARGSession.auth().requestSignedUrl and be obtained by calling ARGAuth.Callback(). Using this URL, you can download contents.

Below is a sample code to generate signed URL.

argsession.auth().requestSignedUrl(item.zipFileUrl, item.title, item.type, new ARGAuth.Callback() {
@Override
public void onSuccess(String url) {
// Using obtained signed url, request download.
requestDownload(path, url, item.uuid, isArItem);
}
@Override
public void onError(Throwable e) {
if (e instanceof SignedUrlGenerationException) {
Log.e(TAG, "SignedUrlGenerationException !! ");
} else if (e instanceof NetworkException) {
Log.e(TAG, "NetworkException !!");
}
}
});