Open vincent911001 opened 1 year ago
v1.0.7
task = DownloadTask.Builder(url, File(path)) .setFilename(filename) .setMinIntervalMillisCallbackProcess(200) .setPassIfAlreadyCompleted(false) .build()
重启应用后,怎么能重新初始化一个能断点续传的DownloadTask
DownloadTask this.id = OkDownload.with().breakpointStore().findOrCreateId(this);
this.id = OkDownload.with().breakpointStore().findOrCreateId(this);
如果重新初始化了,在BreakPointStore会找不到id,然后就不能续传了, 请问我理解对吗?
DownloadCall
BreakpointInfo info; try { BreakpointInfo infoOnStore = this.store.get(this.task.getId()); if (infoOnStore == null) { info = this.store.createAndInsert(this.task); } else { info = infoOnStore; } this.setInfoToTask(info);
有其他方案吗?感谢
OkDownload Version
v1.0.7
Problem Describe
重启应用后,怎么能重新初始化一个能断点续传的DownloadTask
DownloadTask
this.id = OkDownload.with().breakpointStore().findOrCreateId(this);
如果重新初始化了,在BreakPointStore会找不到id,然后就不能续传了, 请问我理解对吗?
DownloadCall
有其他方案吗?感谢