lingochamp / FileDownloader

Multitask、MultiThread(MultiConnection)、Breakpoint-resume、High-concurrency、Simple to use、Single/NotSingle-process
Apache License 2.0
10.99k stars 2.18k forks source link

下载时监听FileDownloadStatus并在notification中更新下载进度,但是当下载完成后不调用 FileDownloadStatus.completed #1089

Open mityao opened 5 years ago

mityao commented 5 years ago

Before Issue

  1. Please search on the Issues
  2. Please search on the wiki
  3. Please set FileDownloadLog.NEED_LOG=true and review the Logcat output from main process and :filedownloader process ( pay attention to Warn and Error level logcat)

Issue

  1. What problem do you get?
  2. Which version of FileDownloader are you using when you produce such problem?
  3. How to reproduce such problem?
  4. Do you set FileDownloadLog.NEED_LOG=true?
  5. Could you please reproduce this problem and provide all main process and :filedownloader process logcat
  6. Can you fix it by yourself and request PR, if not, what's problem do you get when you try to fix it

P.S. If you don't know how to get :filedownloader process, it's recommended to using pidcat to just filter all your application logcat, or define process.non-separate=true on filedownloader.properties


请在Issue前认真的跟进上面提到的建议,这样将可以极大的加快你遇到问题的处理。

问题: 下载时监听FileDownloadStatus并在notification中更新下载进度,但是当下载完成后不调用FileDownloadStatus.completed,导致notification中的进度条始终不到达100%

使用版本为1.7.5

查看日志确实已经调用FileDownloadMessenger: notify completed, 但是Notification中并未收到下载完成, 会调用FileDownloadNotificationListener中的completed,但是无法监听到FileDownloadStatus.completed

我查看了FileDownloadNotificationListener的completed方法,在此方法中会调用destroyNotification(task);难道说在这里导致了notification无法收到FileDownloadStatus.completed?

rantianhua commented 5 years ago

监听FileDownloadStatus并在notification中更新下载进度

请问这是什么意思,具体你是怎么做的?