Comments (12)
可以参考下。任务管理的demo
from filedownloader.
如果需要获得某任务的进度FileDownloader#getSoFar(downloadId):int
与FileDownloader#getTotal(downloadId):int
来获取的。
from filedownloader.
我看了下 #4 的方法。有一个问题就是下载界面都是B界面。从不同的界面进来,数据还是第一个界面的数据。这该怎么弄
from filedownloader.
我不是很明白你的需求与困难所在。
你可以理解FileDownloader是一个驱动下载的lib,业务层面如何应该是业务层级需要实现的,但是如果lib这边相对与业务层级这边无法满足,你详细描述下,我给你思考下处理方式,或者是对FileDownloader进行拓展。
from filedownloader.
额。就是这样。跟应用市场差不多。A界面有个游戏的Listview,从不同的item进来,下载的地址不同但界面都是同一个。现在想做的就是可以同时下多个游戏,并且退出来再进某个游戏下载界面的时候,能重新获取该游戏下载的监听事件。
from filedownloader.
你所说的这种情况,就是 TasksManagerDemoActivity.java 的case,你可以运行下demo,然后稍微调整下,就是你想要的case了。
from filedownloader.
java.lang.ExceptionInInitializerError
at com.example.administrator.myapplication.download.util.TasksManagerDemoActivity$TasksManager.getImpl(TasksManagerDemoActivity.java:371)
at com.example.administrator.myapplication.download.util.TasksManagerDemoActivity.onCreate(TasksManagerDemoActivity.java:54)
直接用的你的。会报这个错误。
from filedownloader.
demo中的代码是没有问题的。我的意思是你在项目demo上进行执行,然后做调整后,可以参考类似方法实现。并不建议你直接拷贝对应的Activity过去的。
P.S: FileDownloader已经支持了类似TasksManagerDemo中的功能,一些业务层级的还希望能够自己在上层封装(TasksManagerDemo中也是模拟了一些业务需求,然后根据业务需求进行实现了业务需求相关部分,所以不建议直接拷贝过去使用而是参考)。
如果你遇到类似问题找不出原因,可以提取你 出现问题的那部分代码,做一个简单的项目,通过github repo的方式给我地址,我抽空给你看下。
from filedownloader.
嗯。我先试试
from filedownloader.
恩。:)
from filedownloader.
刚开始学,有的东西还看不懂所以用了一种比较笨的方式,效果还过得去吧。十分感谢。
from filedownloader.
Well done.
from filedownloader.
Related Issues (20)
- https://discord.gg/kKD7Nt6j open
- Arroncarson new download file thing
- startForegroundService() not allowed due to mAllowStartForeground false
- W/FileDownloader.FileDownloadUtils: don't get instance length fromContent-Range header HOT 1
- 这么好的一个库既然没有人维护了
- https://bugs.chromium.org/p/chromium/people/detail?u=2599207410
- Yeah
- https://g.dev/Needfulthings
- 潜在的多线程调用可能引发的崩溃
- v1.7.5版本关闭debug后无法正常下载,error和completed回调都不走
- Foreground service types are required on `targetSdk` 34 HOT 3
- 在V1.7.7版本上,下载中直接没有通知进度了,看进程还在的,就是没有进度也没有继续下载了,并且查询当前task是还在下载状态,
- 文件第二次下载会删除之前下载好的文件,这是为什么
- Caused by android.app.ForegroundServiceStartNotAllowedException Service.startForeground() not allowed due to mAllowStartForeground false: HOT 1
- Caused by android.app.ForegroundServiceStartNotAllowedException Service.startForeground() not allowed due to mAllowStartForeground false:
- FileDownloadService.inspectRunServiceForeground android.app.MissingForegroundServiceTypeException - Starting FGS without a type callerApp=ProcessRecord{ae38c1e 15288:filedownloader/u0a146} targetSDK=34 HOT 1
- File
- file
- File
- 红米的android 13部分手机会出现SecurityException HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filedownloader.