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

如果下载失败,可以点击通知栏重新下载 #1

Closed
magic0908 opened this issue Jan 5, 2018 · 3 comments
Closed

如果下载失败,可以点击通知栏重新下载 #1

magic0908 opened this issue Jan 5, 2018 · 3 comments

Comments

@magic0908
Copy link

遇到一个问题,就是如果下载的过程中失败了,在通知栏会提示下载失败,如果我想实现点击通知栏重新下载,这个怎么处理好?

@BmobSnail
Copy link
Owner

建议在点击通知栏的时候定向发个广播(Activity事先就注册好广播接收器),接收到广播再重新下载

@magic0908
Copy link
Author

也有可能用户在下载的时候点击了通知栏,这样就会同时下载两个了,需要判断当前是否正在下载或者下载失败,感觉这个也不是太好处理

@BmobSnail
Copy link
Owner

你仔细看一下demo,在handler已经分状态处理了。
下载的时候点击有下载的处理
完成了有完成的处理
失败自然也可以有单独的处理

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

2 participants