Skip to main content
Question

Unable to Download the file and got closed BoxException.

  • May 22, 2025
  • 1 reply
  • 10 views

Forum|alt.badge.img

I am using below code to download the file but i got the BoxException as closed.Can you tell the process how to download the box file.

try {



File file;
file=createFile();

BoxDownload fileDownload = mFileApi.getDownloadRequest(file, boxItem.getId())

.setProgressListener(new ProgressListener() {
@Override
public void onProgressChanged(long numBytes, long totalBytes) {

// Update a progress bar, etc.
}
})
.send();

runOnUiThread(new Runnable() {
@Override
public void run() {


Log.e("fileDonload","is: "+fileDownload);


}
});


} catch (BoxException | IOException e) {

Log.e("DownloadException:","is :"+e.getMessage());
e.printStackTrace();
}

 

1 reply

Forum|alt.badge.img

Is there a full error message we returned that you're able to provide? Alternatively, can you provide me with your apps client ID and a date/time/timezone of the error so I can review our backend logs?

Best, 

Kourtney 

Box Developer Advocate