2019-02-20
2018-08-03
JobScheduler
to handle the download affair. closes #1078Content-Disposition
. closes #10572018-05-19
2018-04-20
Fix: fix fd
isn't released manually when download finished which may raise oom when there are a large number of tasks that are continuously initiated.
2018-03-14
2018-02-05
HEAD
method. close #9422018-02-01
setCallbackProgressTimes
method make setCallbackProgressTimes
work correctly. close #9010-infinite
range. close #933If you are using filedownloader-okhttp3-connection, please upgrade it to the 1.1.0
to adapter FileDownloader 1.7.0.
2017-12-16
FileDownloadSerialQueue
. closes #858no-static-method-found
issue on some mi-phones. closes #867SqliteDatabaseImpl
、RemitDatabase
、NoDatabaseImpl
, so you can overwrite themUser-Agent
if upper layer does not add. closes #848RemitDatabase
instead of DefaultFiledownloadDatabase
to avoid some small task start and finished on the very short time but consume too much time on sync status to database what is useless2017-10-13
isAlive
not guarantee on Network-thread. this closes #7932017-10-12
2017-09-29
FileDownloader#clearAllTaskData
not clear connection table. Closes #7542017-09-11
IllegalFormatConversionException
because of format AtomicLong
with %d
on FileDownloadModel.toString
. Closes #7432017-08-21
NoDatabaseImpl
for the case of some users need a no-database FileDownloader. Refs #727AtomicLong
instead of lock to make better efficiency on increase progressing.2017-07-29
MissingFormatArgumentException
when you pause or resume the FileDownloadserialQueue with it has already done it. Closes #6992017-07-16
2017-07-13
GiveUpException
directly when the response content-length
isn't equal to the expect content-length
calculated from range. Closes #6362017-07-07
2017-07-04
INSTALL_FAILED_DUPLICATE_PERMISSION
when there are more than one application using FileDownloader lib 1.5.7 or more newer since Android 5.0. This problem is raised since v1.5.7, because of we declared permission for receiving completed status broadcast more secure, now we remove it to fix this problem. Closes #6412017-06-28
2017-06-25
broadcast.completed
in filedownloader.properties
: determine whether need post a broadcast when task is completed. Closes #605FileDownloadSerialQueue
. Closes #547FileDownloader#init
and add the replacer FileDownloader#setup
to let user invoke anytime before using Filedownloader
. Closes #500
- If you want to using
broadcast.completed
and receive completed broadcast, you also need to register receiver withfiledownloader.intent.action.completed
action name onAndroidManifest.xml
and please usingFileDownloadBroadcastHandler
class to parse the receivedIntent
.- Now, rather than using
FileDownloader#init
, if you want to register your own customize components for FileDownloader please invokingFileDownloader.setupOnApplicationOnCreate(application):InitCustomMaker
on theApplication#onCreate
, otherwise you just need invokeFileDownloader.setup(Context)
anytime before usingFileDownloader
.
FileDownloadQueueSet
can't handle the case of disable wifi-required. Thanks @qtstcidGenerator
). Closes #6172017-06-18
findRunningTaskIdBySameTempPath
at the same time. Closes #613IllegalArgumentException
when response code is 206 and its ETAG is changed. Closes #612FileDownloadNetworkPolicyException
unhandled exception, when user enable wifi-required but no wifi-state. Thanks @qtstcIllegalStateException
when user upgrades from v1.4.3
or older version to v1.5.2
or newer version directly and some more conditions, more detail please move to #610IllegalStateException
when callback-flow has been final but occurring completed/error at the same time.error
directly when create the parent directory failed. Closes #542416
. Closes #6122017-06-12
download.max-network-thread-count
not work and there are no restrictions on the number of tasks downloaded at the same time since v1.5.0 when tasks runs on the multi-connection Closes #6072017-06-11
IdGenerator
. Closes #2242017-06-08
2017-06-07
FetchDataTask
and it still without any time to sync data to database or file-system. Refs #598FetchDataTast
failed. Refs #5980
when ignore all processing callbacks and just using FinishListener
.over
callback for the FinishListener
when the file has already been downloaded in the past.2017-06-05
InitCustomMaker
on FileDownloader#init
. Closes #592pending
callback you can't get the right sofarBytes
when there are several connections served for the task and the task is resuming from the breakpoint.IDownloadSpeed.Monitor
.IllegalArgumentException
when provide context
is null on FileDownloader.init
to expose the problem earlier.2017-06-05
ConnectionCountAdapter
to customize connection count for each task(you can set it through FileDownloader#init
).FileDownloadRunnable
.The default connection count strategy for each task, you can customize it through ConnectionCountAdapter
:
2017-05-07
FileDownloader#init(Application)
, because Application
is implement of Context
.2017-03-15
PathConflictException
to refused start downloading. Closes #471FileDownloadSerialQueue#getWaitingTaskCount
: Get the count of tasks which is waiting on the serial-queue instance. Refs #3452017-02-03
FileDownloadHttpException
): Fix occurring the IllegalStateException
because of cannot access request header fields after connection is set when occurring http-exception. Closes #4582017-01-11
FileDownloader#init
, let it lighter(just do some action like assign context
and maker
)FileDownloadService
settled on. Closes #420formatter
when occur FileDownloadHttpException
Closes #4382016-12-18
If you still need configure
timeout
、proxy
for the connection component, but you don't want to implement your own one, don't worry, I implement it for the default connection component too, just move to : DemoApplication, check the code if you want.
FileDownloadQueueSet#reuseAndStart
: Add reuseAndStart function to the queue-set to reuse task instances before start them. Ref #383FileDownloadConnection
: Support customize the connection component for FileDownloader and remove the dependency of the okhttp as default. Closes #1582016-10-31
FileDownloadSerialQueue
: Easy to dynamically manage tasks and tasks in the queue will automatically start download one by one. Closes #345.callback
method in the FileDownloadListener
class, besides adding the FileDownloadListener#isInvalid
method to tell the FileDownloader whether the listener has already invalidated, which means it can't receive any messages.FileDownloader#clearAllTaskData
: Clear all data in the filedownloader
database. Closes #361FileDownloadListener#blackCompleted
): Ensure the blockCompleted
callback method can accept any Exception
. Closes #369.Logcat
but also print the tips.BaseDownloadTask#reuse
is called shortly after the call to BaseDownloadTask#pause
may raise an exception. Closes #329.2016-10-15
FileDownloadListener
, we can't receive the callback of FileDownloadMonitor.IMonitor#onTaskOver
for it. Closes #348.2016-10-09
FileDownloadListener
, we can't receive the callback of FileDownloadMonitor.IMonitor#onTaskOver
for it. Closes #348. 2016-10-04
FileDownloader#insureServiceBind()
: Easy to block the current thread, and start FileDownloader service, after the service started then executes the request which needs the service alive. Refs #324.FileDownloader#insureServiceBindAsync()
: Easy to start FileDownloader service, and after the service started then executes the request which needs the service alive. Refs #324.FileDownloader#bindService(runnable:Runnable)
: Easy to start FileDownloader service, and after the service started then executes the runnable
. Refs #324.FileDownloader#init(Context,InitCustomMaker)
: Easy to initialize the FileDownloader engine with various kinds of customized components.InitCustomMaker#database
): Support customize the database component with the implementation of FileDownloadDatabase
, and implements the default database component: DefaultDatabaseImpl
.InitCustomMaker#outputStreamCreator
): Support customize the output stream with the implementation of FileDownloadOutputStream
, and implements the default output stream component FileDownloadRandomAccessFile
, and some alternative components: FileDownloadBufferedOutputStream
、FileDownloadOkio
.2016-09-29
file.non-pre-allocation
in filedownloader.properties
: Whether doesn't need to pre-allocates the 'content-length' space when to start downloading, default is false
. Closes #313 .StackOverflowError
when thread pool getActiveCount is not right because of it just an approximate number. Closes #321 .IllegalStateException
which message is 'No reused downloaded file in this message'. Closes #316 .minSdkVersion
: 8->9. Refs #321 .2016-09-13
BaseDownloadTask#setWifiRequired
: Set whether the task only allows downloading on the wifi network type. Default false
. Closes #281 .FileDownloadExecutors
) and all threads in pools will be terminate after idle 5 second. Refs #303 .Throwable
s thrown on FileDownloadListener#blockComplete
method and callback to FileDownloadListener#error
method instead of FileDownloadListener#completed
. Closes #305 .2016-09-06
IllegalStateException
. Closes #307 .2016-09-05
If you used
BaseDownloadTask#ready()
which is a deprecated method now, just migrate it toBaseDownloadTask#asInQueueTask():InQueueTask
andInQueueTask#enqueue()
.
BaseDownloadTask#asInQueueTask():InQueueTask
and Deprecated BaseDownloadTask#ready()
: Declare the task is a queue task, what will be assembled by a queue which makes up of the same listener
task and there is a method InQueueTask#enqueue()
to enqueue this task to the global queue to ready for being assembled by the queue. The operation of method InQueueTask#enqueue()
is the same to the Deprecated method BaseDownloadTask#ready()
, we wrap the ready()
method in this way just want you to know clearly: Only if the task belongs to a queue, you need to invoke this method otherwise if this task is an isolated task but you invoke this method, it's wrong and you will receive an exception(More detail reason please move to the exception thrown in DownloadTask#start
).listener
object, and they are started in the different thread simultaneously. Closes #282 .2016-08-21
BaseDownloadTask#cancel
: This method is used for explaining why the pause operation is the same as the cancel operation.isDownloaderProcess
.2016-08-16
FileDownloadListener#error
. Closes #243FileDownloadListener#completed
directly, but the targetFilePath
may be null in the FileDownloadListener#completed
callback method. Closes #2372016-07-31
FileDownloader#clear
: clear the data with the task id in the filedownloader database. Closes #218.FileDownloader#start(FileDownloadListener, boolean)
: Whether start tasks successfully. Closes #215.ActivityManager
is null when to init FileDownloader. Closes #210.completed
status when another same task is downloading. Closes #220FileDownloadListener
. Closes #223.3.3.1
to 3.4.1
.2016-07-10
FileDownloadUtils#getTempPath
: Get the temp path is used for storing the temporary file not completed downloading yet(filename.temp
). Refs #172.FileDownloader#getStatusIgnoreCompleted(id:int)
: Get the downloading status without cover the completed status(If completed you will receive INVALID
).FileDownloader#getStatus(id:int, path:String)
: Get the downloading status.FileDownloader#getStatus(url:String, path:String)
: Get the downloading status.FileDownloadUtils#isFilenameConverted(context:Context)
: Whether tasks from FileDownloader Database has converted all files' name from filename
(in old architecture) to filename.temp
, if it is not completed downloading yet.FileDownloadUtils#generateId(url:String, path:String, pathAsDirectory:boolean)
: Generate a Download Id
which can be recognized in FileDownloader.BaseDownloadTask#setPath(path:String, pathAsDirectory:boolean)
: If pathAsDirectory
is true
, the path
would be the absolute directory to store the downloading file, and the filename
will be found in contentDisposition
from the response#header
as default.BaseDownloadTask#isPathAsDirectory
: Whether the result of BaseDownloadTask#getPath()
is a directory
path or directory/filename
path.BaseDownloadTask#getTargetFilePath
: Get the target file path to store the downloading file.FileDownloadQueueSet#setDirectory
: Set the directory
to store files in this queue.path
of the task as the directory to store the file, and in this case, the filename
will be found in contentDisposition
from the response#header
as default. Refs #200.filename.temp
). Refs #172.File#exists()
directly. Refs #176, #172.INVALID
or progress
to receive completed
message preferentially, to ensure the callback of progress
can be handled. Refs #123pending
and downloaded so far bytes is more than 0 because it can be used for resuming from the breakpoint. Closes #176.2016-06-12
BaseDownloadTask#setCallbackProgressMinInterval
: Set the minimum time interval between each callback of 'progress'. Closes #167.FileDownloader#setMaxNetworkThreadCount
: Change the number of simultaneous downloads(the number of the simultaneously running network threads) at the code side. Closes #168.FileDownloader#init(Context,OkHttpClientCustomMaker,int)
: Accept initializing the number of simultaneous downloads(the number of the simultaneously running network threads) with the FileDownloadService initializes. Closes #168.SparseArray
instead of HashMap
for mapping all FileDownloadModel
.BaseDownloadTask#setForceReDownload(true)
and the task has already downloaded will trigger 'warn' callback. Closes #169 .SocketTimeOutException
, and no longer care about whether the message of Throwable is empty, this is very redundant.3.2.0
to 3.3.1
.2016-05-19
2016-05-13
Why FileDownload can run in UI process? Ref filedownloader.properties.
2016-05-10
BaseDownloadTask#isUsing():boolean
: Whether this task object has already started and used in FileDownload Engine. Closes #137 .2016-05-02
BaseDownloadTask#getId():int
: deprecate getDownloadId()
, and using the getId()
instead, for BaseDownloadTask
.FileDownloadListener
, the new architecture just like a messenger and message-station, each tasks would write snapshot messages to message-station.2016-04-22
FileDownloader#setTaskCompleted(taskAtomList:List<FileDownloadTaskAtom>)
: Used to telling the FileDownloader Engine that a bulk of tasks have already downloaded by other ways.:filedownloader
process. Closes #119 .2016-04-20
filedownloader.properties
,no more in the root directory of project, instead below the assets
of a module, for example /demo/src/main/assets/filedownloader.properties
.filedownloader.properties
not work. Closes #117.2016-04-19
FileDownloader#setTaskCompleted
: Used to telling the FileDownloader Engine that the task with the url and the path has already completed downloading by other ways(not by FileDownloader Engine).download.max-network-thread-count
in filedownloader.properties
: The maximum network thread count for downloading simultaneously, default is 3. Closes #116.2016-04-18
BaseDownloadTask#getSpeed
and BaseDownloadTask#setMinIntervalUpdateSpeed
: Get the download speed for a task. If it is in processing, the speed would be real-time speed; If finished, the speed would be average speed. Closes #95FileDownloader#startForeground
and FileDownloader#stopForeground
for supporting the Foreground mode(Service#startForeground); For ensure the FileDownloadService would keep alive when user removed the App from the recent apps. Closes #110 .download.min-progress-step
and download.min-progress-time
: The min buffered so far bytes and millisecond, used for adjudging whether is time to sync the download so far bytes to database and make sure sync the downloaded buffers to the local file. More small more frequent, then download more slowly, but will safer in the scene of the process is killed unexpectedly. Default 65536(MinProgressStep) and 2000(MinProgressTime), which follow the value in com.android.providers.downloads.Constants
.process.non-separate
in filedownloader.properties
: The FileDownloadService runs in the separate process ':filedownloader' as default, if you want to run the FileDownloadService in the main process, set this configuration as true
. Closes #106 .2016-04-11
FileDownloadOutOfSpaceException
, Throw this exception, when the file will be downloaded is too large to store.FileDownloadListener
: started
which will be invoked when finish pending, and start the download runnable.FileDownloadMonitor.IMonitor
: onTaskStarted
which will be invoked when finish pending, and start the download runnable.over
in FinishListener
, for recognizing target task in case of one-FinishListener for more than one task. Closes #69 .BaseDownloadTask#start
for a running-task object, add provide 'reuse' method to reuse a used and already finished task object. Closes #91 .progress
call-back included the ending frame ( sofarBytes == totalBytes
).2016-04-06
FileDownloadHttpException
and FileDownloadGiveUpRetryException
, and optimize the mechanism of exception. Closes #67 .FileDownloader
use Context
instead of Application
( FileDownloader#init(Context)
) , for more make sense and unit-test. Closes #54 .IllegalFormatConversionException
on EventPool
when publishing the event which does not in effect and FileDownloadLog.NEED_LOG
is true
. Closes #30 .IFileDownloadIPCService.java
, when lost connection from filedownloader process. because the IBinder's hosting process(filedownloader process) has been killed/cancelled. Closes #38 .3.1.2
to 3.2.0
.2016-02-15
filedownloader.properties-http.lenient
: Add 'filedownloader.properties' for some special global configs, and add 'http.lenient' keyword to 'filedownloader.properties' to handle the case of want to ignore HTTP response header from download file server isn't legal.FileDownloadNotificationHelper
: Refashioning NotificationHelper, let handle notifications with FileDownloader more make sense. #25FileDownloader#init(Application,OkHttpClientCustomMaker)
: Support customize OkHttpClient which will be used for downloading files.2016-01-23
FileDownloader is enable Avoid Missing Screen Frames as default, if you want to disable it, please invoke
FileDownloader.getImpl().disableAvoidDropFrame()
.
We default open Avoid Missing Screen Frames, if you want to disable it(will post to ui thread for each FileDownloadListener event achieved as pre version), please invoke:
FileDownloader.getImpl().disableAvoidDropFrame()
.
FileDownloadMonitor
: You can add the global monitor for Statistic/Debugging now.FileDownloader#enableAvoidDropFrame(void)
: Avoid missing screen frames, but this leads to all callbacks of FileDownloadListener do not be invoked at once when it has already achieved.FileDownloader#disableAvoidDropFrame(void)
: Disable avoid missing screen frames, let all callbacks of FileDownloadListener be invoked at once when it achieve.FileDownloader#isEnabledAvoidDropFrame(void)
: Has already enabled Avoid Missing Screen Frames. Default: trueFileDownloader#setGlobalPost2UIInterval(intervalMillisecond:int)
: For Avoid Missing Screen Frames. Each intervalMillisecond post 1 message to ui thread at most. if the value is less than 0, each callback will always post a message to ui thread immediately, may will cause missing screen frames and produce great pressure on the ui thread Looper. Default: 10ms.FileDownloader#setGlobalHandleSubPackageSize(packageSize:int)
: For Avoid Missing Screen Frames. {packageSize}: The number of FileDownloadListener's callback contained in each message. value completely dependent on the intervalMillisecond of setGlobalPost2UIInterval, describe will handle up to {packageSize} callbacks on the each message posted to ui thread. Default: 5.BaseDownloadTask#setSyncCallback(syncCallback:boolean)
: if true will invoke callbacks of FileDownloadListener directly on the download thread(do not post the message to the ui thread), default false.BaseDownloadTask#isSyncCallback(void):boolean
: Whether sync invoke callbacks of FileDownloadListener directly on the download thread.FileDownloadUtils#setDefaultSaveRootPath
: The path is used as Root Path in the case of task without setting path in the entire Download Engine.FileDownloadQueueSet
: In order to be more convenient to bind multiple tasks to a queue, and to the overall set.FileDownloadMonitor
to monitor entire Download Engine.FileDownloadListener
methods do not through EventPool, instead, invoke directly.2016-01-17
BaseDownloadTask#setTag(key:int, tag:Object)
: Set a tag associated with this task. If the key already existed, the old tag will be replaced.BaseDownloadTask#getTag(key:int)
: Get the object stored in the task as a tag, or null if not set.BaseDownloadTask#addHeader(name:String, values:String)
: Add custom request header to the task. Attention: We have already handled ETag, and will add If-Match
& Range
value if it works.BaseDownloadTask#addHeader(line:String)
: Add custom request header to the task. Attention: We have already handled ETag, and will add If-Match
& Range
value if it works.BaseDownloadTask#removeAllHeaders(name:String)
: Remove all custom request header bind with the {name}
.Warn
、Error
、Assert
level of log in order to debugging in the case of the value of FileDownloadLog.NEED_LOG
is false(default).2.7.1
to 3.0.1
.2016-01-13
FileDownloader#unBindServiceIfIdle(void)
: If there is no active task in the :filedownloader
progress currently , then unbind & stop :filedownloader
processFileDownloader#getStatus(downloadId)
: Get download status by the downloadId(ps: Please refer to Tasks Manager demo
FileDownloader#isServiceConnected(void)
: Whether started and connected to the :filedownloader
progress(ps: Please refer to Tasks Manager demo):filedownloader
progress start.callbackProgressTimes
column in db.FileDownloader#pauseAll
not effect in case of low memory and ui progress is Background Progress situation and the :filedownloader
progress(Service Progress) alive and still have running tasks in the filedownloader
progress but ui progress has died and relived.FileDownloader#unBinderService
manually.2016-01-04
FileDownloadLargeFileListener
, getLargeFileSoFarBytes()
,getLargeFileTotalBytes()
.2.7.0
to 2.7.1
.2015-12-27
pause()
invalid in large queue task.2015-12-25
2015-12-24
FileDownloadStatus
parameter type is changed from int
to byte
, which is frequently copied in IPC.2015-12-23
2015-12-22
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。