Filedownloader: get background task

Created on 9 Aug 2016  ·  7Comments  ·  Source: lingochamp/FileDownloader

I want to make an app like googleplay. how can I get downloading tasks in a separated activity?
thanx

question

Most helpful comment

"Quick view" describes the current version(0.3.4). And normally the v1.0.0 will be released in next week.

All 7 comments

Sorry, FileDownloader doesn't provide any method to get downloading tasks.

There are several reasons:

  1. The data in filedownloader isn't bound any View/Activity.
  2. The data cached in filedownloader is used for maintaining the work of downloading and message flowing. The data store in the internal filedownloader database is used for ensuring any tasks can resume from the breakpoint in any valid situation.
  3. The data cached in filedownloader will be changed for more stable in many upper users don't know unexpected situations.

So, we don't commend the upper logic coupled with the filedownloader internal data.

Solution:

For upper layer, for more flexible and more stable, very recommend maintaining the downloading data by yourselves. Refs TaskManagerDemo.

thanx alot for your useful guidance but this lib is very complicated and im beginer in java:)
would you explain more? i whant to start download in activity1 and get download task in activity 2
thanx again

I thank the wiki is helpful to you.

I'm writing the more readable java doc for this library and I'm perfecting the architecture of the visible layer(BaseDownloadTask、FileDownloadTask) for more readable too, you will find those until the next version(v1.0.0).


Quick view:

Message:

  • Model: MessageSnapshot.java、SmallMessageSnapshot.java、LargeMessageSnapshot.java
  • Factory: MessageSnapshotTaker.java
  • ThreadPool: MessageSnapshotThreadPool.java
  • Driver: MessageSnapshotFlow.java
  • Upper transmit architecture: FileDownloadMessageStation.java、FileDownloadMessenger.java

Data

  • Internal Data: FileDownloadModel.java
  • Internal Database: FileDownloadDBHelper.java、FileDownloadDBOpenHelper.java

Working Component

  • Event Manager: FileDownloadMgr.java
  • Task-Runner: FileDownloadRunnable.java
  • Network-Thread-Pool: FileDownloadThreadPool.java
  • Running-Task: FileDownloadList.java
  • Launcher-directly-thread-pool and controller: FileDownloadTaskLaunder.java
  • Service-communicator: IFileDownloadServiceProxy.java、FileDownloadServiceProxy.java、FileDownloadServiceSharedTransmit.java、FileDownloadServiceUIGuard.java
  • Implemented-task: FileDownloadTask.java

Host Component

  • Host: FileDownloadService.SharedMainProcessServiceFileDownloadService.SeparateProcessService

Visible Layer

  • Atom Task: BaseDownloadTask.java
  • Entrance: FileDownloader.java
  • Listener: FileDownloadListener.java、FileDownloadLargeFileListener.java、FileDownloadSampleListener.java、FileDownloadConnectListener.java、FileDownloadNotificationListener.java、BaseDownloadTask.FinishListener
  • Utils: FileDownloadUtils.java、FileDownloadProperties.java
  • Global Monitor: FileDownloadMonitor.java
  • Notification: FileDownloadNotificationHelper.java、BaseNotificationItem.java
  • Exception: FileDownloadGiveUpRetryException.java、FileDownloadHttpException.java、FileDownloadOutOfSpaceException.java
  • Status: FileDownloadStatus.java
  • Header: FileDownloadHeader.java
  • Helper: FileDownloadQueueSet.java

i appriciate that :+1:
whene thise version wille release?
i need thet deeply

"Quick view" describes the current version(0.3.4). And normally the v1.0.0 will be released in next week.

Impatiently waiting for that
thanx for your response.

Pleasure.

Was this page helpful?
0 / 5 - 0 ratings