Downloading file (Android) what am I doing wrong??
I have verified that fileID is correct. Yet I get an exception - java.io.FileNotFoundException.
Any ideas?
File destinationFile = new File(getFilesDir(), “myfile.crs”);
BoxApiFile fileApi = new BoxApiFile(msession);
try {
BoxDownload fileDownload = fileApi.getDownloadRequest(destinationFile, fileID)
// Optional: Set a listener to track download progress.
.setProgressListener(new ProgressListener() {
@Override
public void onProgressChanged(long numBytes, long totalBytes) {
// Update a progress bar, etc.
}
})
.send();
} catch (BoxException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
サインインしてコメントを残してください。
コメント
1件のコメント