ProgressManager icon indicating copy to clipboard operation
ProgressManager copied to clipboard

⏳ Listen the progress of downloading and uploading in Okhttp, compatible Retrofit and Glide (一行代码即可监听 App 中所有网络链接的上传以及下载进度, 包括 Glide 的图片加载进度).

Results 12 ProgressManager issues
Sort by recently updated
recently updated
newest added

- bolding of the introduction is unecessary - wrapped step 1 of usage so it doesn't cause horizontal scrolling - fixed the wording of the introduction (grammar/spelling/typos) - in the...

### Problem Progress Listener cannot listen to request with query that contains "/", because mResponseListeners Hashmap failed to detect item, when requested "/" change into "%2F", so containsKey(key) will return...

Thank you for such a great library, this is the best download progress listener that I could find, can you add notification support? so it can be more superb? Thank...

为什么id不是File的路径, 如果同时上传多个根据事件 回调不好处理啊

类库很好用,希望迁移到maven,jcenter已跑路

1.WeakHashMap的key被回收了,需要下一次操作Map才会移除value,导致内存泄漏; 2.demo中Glide加载图片,使用了同一对象的url,Glide会引用url生成key,存在内存缓存里,url不能被回收导致内存泄漏; 个人觉得还是需要添加移除listener的接口,或者listener作为弱引用保存比较好

OkHttp添加了公共参数比如 ?token=xxxx, 导致请求url 和ProgressManager.getInstance().addResponseListener(url,xx)中的url不一样,调试发现,mResponseListeners.containsKey(key) 最后导致没通过导致始终不走进度回调,这个可以优化下防止他人踩坑

之前是必须在网络请求之前添加好所有的listener,但是有些场景需要在网络请求之后还可以添加新的listener。 比如常见的应用市场,app列表页面每一个item会有一个下载按钮,点击后开始下载并显示进度,而点击item进入详情页也会有一个带进度的下载按钮,如果先在列表页面点击了下载,再进入详情页,详情页也应该和列表页同步地获取到进度信息。 主要改动是ProgressRequestBody和ProgressResponseBody中的mListeners由数组改为List,与ProgressManager中的listener指向相同的内存地址,同时构造函数中的listeners也不再有null的情况,在ProgressManager的wrap方法中,如果根据url获取到的listeners为null,会put进去一个空的List并传给ProgressRequestBody/ProgressResponseBody。

I'm trying this library to upload the file (image/video/audio) in byte[] format. But its not working well, It directly shows the progress percent upto 90, Please help me to fix...