【发布时间】:2016-09-26 17:24:04
【问题描述】:
我正在尝试从 Firebase 存储中下载一些文件。当有稳定的互联网连接时,它工作得很好。但是,如果在下载内容中途丢失了互联网连接,它只会继续尝试下载内容。如何检测是否没有下载内容?
我已经实现了StorageReference 的onProgessListener。但是,我不确定如何使用它来检测下载是否没有进度。
new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
//What to do with the taskSnapshot to detect if there are no progress in the download?
}
};
【问题讨论】:
标签: android download firebase interruption firebase-storage