You can download content's zip_file through the REST API, using each content download URL. For the zip_file URL, you need to first request a signed URL.
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 sample code to generate the signed URL.
argsession.auth().requestSignedUrl(item.zipFileUrl,item.title,item.type,new ARGAuth.Callback() { @OverridepublicvoidonSuccess(String url) {// Using obtained signed url, request download.requestDownload(path, url,item.uuid, isArItem); } @OverridepublicvoidonError(Throwable e) {if (e instanceof SignedUrlGenerationException) {Log.e(TAG,"SignedUrlGenerationException !! "); } elseif (e instanceof NetworkException) {Log.e(TAG,"NetworkException !!"); } }});
argsession.auth().requestSignedUrl(item.zipFileUrl, item.title, item.type, object : ARGAuth.Callback {overridefunonSuccess(url: String) {// Using obtained signed url, request download.requestDownload(path, url, item, isArItem) }overridefunonError(e: Throwable) {if (e is SignedUrlGenerationException) { Log.e(TAG, "SignedUrlGenerationException !! ") } elseif (e is NetworkException) { Log.e(TAG, "NetworkException !!") } }})