You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks so much for this library. I was using Fetch but it has alot of bugs, I just bumped into this library few mins ago. Can you add more callbacks into the DownloadListener like onResumed,onPaused,onStarted,onCancelled like below
private static DownloadListener downloadListener = new DownloadListener() {
@Override
public void onProgress(int progress) {
DownloadInfo downloadInfo = getDownloadInfo();
handleDownloadProgress(downloadInfo);
}
@Override
public void onFailed() {
DownloadInfo downloadInfo = getDownloadInfo();
DownloadInfo.Status downloadStatus = downloadInfo.getStatus();
//Like, I am confused here how would I know if the fail was as a result of failed or paused
if (downloadStatus == DownloadInfo.Status.PAUSED) {
handlePausedDownload(downloadInfo);
} else if (downloadStatus == DownloadInfo.Status.FAILED) {
handleDownloadError(downloadInfo);
}
}
@Override
public void onSuccess() {
DownloadInfo downloadInfo = getDownloadInfo();
handleCompletedDownload(downloadInfo);
}
//Please add the following
@Override
public void onResumed(){
}
@Override
public void onPaused(){
}
@Override
public void onCancelled(){
}
};
By the way how can I cancel a download and also how do I know if a download was paused. Very important. Thanks.
The text was updated successfully, but these errors were encountered:
Thanks so much for this library. I was using Fetch but it has alot of bugs, I just bumped into this library few mins ago. Can you add more callbacks into the DownloadListener like onResumed,onPaused,onStarted,onCancelled like below
By the way how can I cancel a download and also how do I know if a download was paused. Very important. Thanks.
The text was updated successfully, but these errors were encountered: