-
-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download notification disappearing #3882
Comments
@kelson42 Can you please provide some addtional information so that the problem can be narrowed down?
|
Android 13, only one download at a time. It disappear I believe after a while if I don't use the device and never reapoear... but downloads continues (I see it in the library). |
@kelson42 I have tested this issue with different large zim files, and left the phone until the files were not downloading, and monitored the behavior but the notification was visible all the time. The notification only disappeared when I killed the application(closed from the background list), and again visible when I reopened the application. Apart from this, the notification is triggering from the fetch lib with the override fun progress(download: Download, etaInMilliSeconds: Long, downloadedBytesPerSecond: Long) {
synchronized(lock) {
fetchNotificationHandler.post {
synchronized(lock) {
for (fetchNotificationManager in fetchNotificationManagerList) {
if (fetchNotificationManager.postDownloadUpdate(download)) break
}
}
}
fetchListenerMap.values.forEach {
val iterator = it.iterator()
while (iterator.hasNext()) {
val fetchListener = iterator.next().get()
if (fetchListener == null) {
iterator.remove()
} else {
uiHandler.post {
fetchListener.onProgress(download, etaInMilliSeconds, downloadedBytesPerSecond)
}
}
}
}
if (fetchGroupListenerMap.isNotEmpty()) {
val groupId = download.group
val fetchGroup = groupInfoProvider.getGroupReplace(groupId, download, Reason.DOWNLOAD_PROGRESS_CHANGED)
fetchGroupListenerMap.values.forEach {
val iterator = it.iterator()
while (iterator.hasNext()) {
val fetchListener = iterator.next().get()
if (fetchListener == null) {
iterator.remove()
} else {
fetchListener.onProgress(groupId, download, etaInMilliSeconds, downloadedBytesPerSecond, fetchGroup)
}
}
}
} else {
groupInfoProvider.postGroupReplace(download.group, download, Reason.DOWNLOAD_PROGRESS_CHANGED)
}
val downloadObserverSet = downloadsObserverMap[download.id]
downloadObserverSet?.forEach {
val observer = it.get()
if (observer != null) {
uiHandler.post {
observer.onChanged(download, Reason.DOWNLOAD_PROGRESS_CHANGED)
}
}
}
}
} In the above code, This code triggers the notification for (fetchNotificationManager in fetchNotificationManagerList) {
if (fetchNotificationManager.postDownloadUpdate(download)) break
} As you mentioned downloads continue so this method is running as it is publishing the download progress via below method, and we are handling this progress and showing it in fetchListener.onProgress(download, etaInMilliSeconds, downloadedBytesPerSecond) So the |
I will retest once #3940 is merged |
I have no clear reproduction steps, but downloading large files at some point make the download notification disappearing.
The text was updated successfully, but these errors were encountered: