Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议已经下载过了加个回调 #42

Open
wpq2014 opened this issue Jun 2, 2016 · 0 comments
Open

建议已经下载过了加个回调 #42

wpq2014 opened this issue Jun 2, 2016 · 0 comments

Comments

@wpq2014
Copy link

wpq2014 commented Jun 2, 2016

if (info.file.exists() && info.file.length() == info.totalBytes) {
Log.d(TAG, "The file which we want to download was already here.");
return;
}
上边这个地方已经下载过了仅仅是Log提示,不能满足我现在的需求,我用这个库做版本更新,下载apk成功后没有安装退出了APP,再进来提示更新时又执行下载,这时只有onPrepare()回调执行了,完了就提示上边这个了,但是我希望能提示我已经下载好了可以直接安装,我觉得有两个方案:1. 这里直接回调onFinish(File file),这样是可行的但是逻辑不够合理; 2. 加个回调onAlreadyExists(File file) 或者 onDownloaded(FIle file)之类的。
上边这些只是我个人的想法,不知道合不合理,盼答复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant