Skip to content
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

Unified Notifications #12256

Closed
alperozturk96 opened this issue Dec 8, 2023 · 7 comments · Fixed by #12907
Closed

Unified Notifications #12256

alperozturk96 opened this issue Dec 8, 2023 · 7 comments · Fixed by #12907
Assignees
Labels
enhancement hotspot: sync conflicts Sync conflict management matters hotspot: uploads tab and transfer notifications The uploads tab and upload + download related notifications

Comments

@alperozturk96
Copy link
Collaborator

alperozturk96 commented Dec 8, 2023

Problem

  1. For each upload, download or any other file related operation app throwing notification
  2. Same notification may appear again time to time
  3. Code complexity increased in-time and causes problem for maintenance
  4. Too many notification annoys user

As mentioned in these issues:

Solution

  1. If multiple file operation running at the same time or back to back no need to throw multiple notification. Single notification can show progress for all operations one by one.
  2. Managing notifications directly inside service or inside some other class causes problem regarding code readability and maintenance. One single class that will handle notifications and it will be reusable for different needs. And with proper tests (unit, integration) we can be sure about robustness of our solution.
@satvik2131
Copy link

Ok , if i am not wrong , it's like if we upload 5 files , it shows 5 upload bars one by one in notification , that be could be one , am I correct ?

@alperozturk96
Copy link
Collaborator Author

Ok , if i am not wrong , it's like if we upload 5 files , it shows 5 upload bars one by one in notification , that be could be one , am I correct ?

No need to show 5 different notification for 5 different files, we can use one notification for multiple files.

@joshtrichards joshtrichards added hotspot: sync conflicts Sync conflict management matters hotspot: uploads tab and transfer notifications The uploads tab and upload + download related notifications labels Dec 23, 2023
@joshtrichards
Copy link
Member

FYI: I've created a temporary label for tracking transfer related notifications which might be a further resource to study the problem(s): hotspot: uploads tab and transfer notifications The uploads tab and upload + download related notifications

@MrRinkana
Copy link

MrRinkana commented Mar 31, 2024

To illustrate this problem I made a recording during an upload of my pictures folder:

https://github.com/nextcloud/android/assets/39345772/eca61360-2ac4-42f5-8bf7-54431f611231
This was when it was a bit slower as well, slightly smaller files or if I would have recorded while my phone was closer to the wifi router it would look almost epileptic. Clicking/interacting with the notification below is impossible (or with the nc notification for that matter).

It does make sense to do the upload silently, but it should be an user choice: there's value in seeing how the upload is progressing. An example of that is if one uploads a folder manually, and such is not an automatic upload.

The optimal solution is to have a single notification during upload that:

  • shows overall progress with a bar that simply is x uploaded out of y items (nbr %)
  • Another progress bar visible only when the notification is expanded, showing the currently uploading items progress % out of total size (GiB/MiB or w/e)
  • That notification can be disabled for automatic uploads in app, or disabled altogether trough android notification settings, the latter already possible as is.

EDIT: Here is how it can look when the uploads are really fast:
https://github.com/nextcloud/android/assets/39345772/b6cb4393-e1dc-4db4-a15e-8a6793c85fca

@alperozturk96 alperozturk96 self-assigned this Apr 19, 2024
@alperozturk96 alperozturk96 linked a pull request Apr 19, 2024 that will close this issue
1 task
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.30.0 milestone Jun 3, 2024
@BluePixel4k
Copy link

@alperozturk96 thank you for this improvement!

Would it be possible, that the progress bar shows the progress over the whole batch of files that get uploaded (and not for each file)?
Then it would be easier to implement the parallel upload/download for Android: #10124

@alperozturk96
Copy link
Collaborator Author

alperozturk96 commented Jun 3, 2024

@alperozturk96 thank you for this improvement!

Would it be possible, that the progress bar shows the progress over the whole batch of files that get uploaded (and not for each file)? Then it would be easier to implement the parallel upload/download for Android: #10124

Hello

Thanks for the comment. We are using work manager and for each work manager we have unified notification right now.

For Example

In home screen when user wants to download File A and File B user will see two notifications because two different workers started

But if user wants to download whole folder, user going to see one notification for all files inside that specific folder.

Regarding progress bar, it is an indication only for one file's upload or download progress.

I will discuss unified progress bar and unified worker for all downloads and uploads regardless of worker with our team and get back to you as soon as possible. Current master branch is much better than before, and of course we can make it better in the future.

Getting feedback from community is always making us happy.

You can check the PR for improvements we have done.

@BluePixel4k
Copy link

Hello @alperozturk96,

thanks for your response!

I already tested the latest APK from this PR, and yes it's a good improvement, thx 👍

Could you also discuss the parallel upload/download feature (#10124)? This would speed up the upload/download process a lot :)

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hotspot: sync conflicts Sync conflict management matters hotspot: uploads tab and transfer notifications The uploads tab and upload + download related notifications
Projects
Status: ☑️ Done
Development

Successfully merging a pull request may close this issue.

6 participants