BoxFile download url android sdk
Hi everyone.
First i want to apologize for my english grammar mistake.
Ok so, i hit some issue with the Box android sdk.
I try to get the url of any file on box to download it.I have searched a lot on internet but a didn't found anything that work really.
What i understand on the several forums,is that to get the download url of a file,we need to share the file.
By download url , i means any link that download directly the file,which means that i don't want show the box html page to download a file.
And for share the file on the Box Android SDK , here is what i do:
boxApiFileInstance.getCreateSharedLinkRequest(ITEM_ID).setCanDownload(true)
.setAccess(BoxSharedLink.Access.OPEN) .toTask().addOnCompletedListener(new BoxFutureTask.OnCompletedListener() { @Override public void onCompleted(BoxResponse response) { if(response.isSuccess()){ BoxFile boxFile= response.getResult(); String downloadUrl= boxFile.getSharedLink().getDownloadUrl(); //This return me a web link to show the Box page to download the file } else{ //Handle failure } } }).run();
The download url variable as you can see, returns link for download url page or what i want is a link to download directly the file.i spent almost one week on internet to find an solution, Can you help me please ?
Please sign in to leave a comment.
Comments
0 comments