-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[New Arch] Download a single file #2872
Comments
We will stop this issue for the moment. It is needed to complete #2955 first. |
I have some questions about how downloads work now and how they should work after this synchronization refactor. Let's start showing the current behavior.Downloads are stored in the shared storage. There, any application can access them. There is no restriction about that, files are "public" once we download them to the device. Similar to Telegram, WhatsApp, and a lot of other apps. If we uninstall the app, those downloaded files will be persisted, public for any app that has access to the shared storage. We can find more information about this here. At the moment, we download files when previewing them (except videos, that are streamed), making them Av. Offline, or selecting them and download. Downloads are performed sequentially. This means that we download files one by one. Every download shares the notification. This means that we show a notification with the download progress, and then we show a notification when the download is finished. When we download just one file, there is no problem with this behavior. We show a notification with the progress, and when it finishes the notification progress is replaced with the finished notification. But, when we download several files, the notification is replaced for each download and it may cause them to show and hide a notification too fast that they are not properly shown.
Let's discuss the expected behaviorRelated to scoped storage #2877. And taking this guide as a reference, we have several topics to discuss. We could consider ownCloud files as app-specific files and we will make them more secure, other apps could access them using the SAF that we support via our DocumentsProvider but it will be more restricted. This will make our files more secure, and those files will be removed from the device if the app is uninstalled. But we need to take care of the space we use since it is limited This way, we could differentiate at least some types of downloads:
In any case, if we decide to keep the previous behavior or to change it, downloads are not performed sequentially anymore. Several files can be downloaded at the same time. And there are several ways to notify the user about this: For previews, it may have no sense to show a notification if we are showing the progress in the app because the user expects it to be opened as soon as the download finishes. For 'Select and download' I think that we should keep showing the download notification because the user does not expect a specific action when it finishes downloading. If we think that it is important to show the download progress, we could try to show a summary of the current downloads, for example:
|
it's a bad new... even worse if they don't tell you how limited it is.
Previews: i like the idea they can be removed from cache, manually, or automatically (feasible as future improvement? iOS app implements this) Av. Offline: They must be persisted. I think there is no discussion Select and download: Would it make sense to get rid of this option? i mean, with Previews you can open and check a file by clicking on it. If this file is important for you, you will make it av. offline and will be always stored and synced in your device. Downloading a file and keep it in the device in a non-synced way does not offer advantages (doesn't it?). Indeed, we have to take care of the space limit. What do you think??
Agreed, previews are expected to that moment, with the app in foreground and the user watching the screen. Nothing to notify.
Yes, we can apply this to the av. offline as well
this idea is good for me. Will the summary be always displayed? even when you have 1 download. In case the user wants to download a big amount, he will want to be notified when the whole thing is done. Notifying after every single download will probably bother more than helping Thanks for sharing your thoughts!! i hope the discussions go on! |
Finally, the implementation of the current issue will keep the behaviour. This is:
|
Taking into account four scenarios for downloads: Previews, Av. Offline, Select and download, and Documents Provider stuff, we could discuss notifications behavior.
|
BTW, showing that we are currently downloading a file in the file list lags the device at the moment. It performs a lot of queries to WorkManager and it makes it lag old devices. This will change in the future when we switch to RecyclerView, use Flow to retrieve the files and use the Database as a unique source of truth. |
i agree. What happened if, for example:
Shouldn't we notify the user when the download finishes? |
Synchronization epic: #2818
Postponed for the moment. To do in upcoming PRs.
AC:
Errors:
TASKS
PR
The text was updated successfully, but these errors were encountered: