Android: Nextcloud app opens and closes new Android notification entries for every synced file

Created on 24 Jun 2017  Â·  23Comments  Â·  Source: nextcloud/android

Actual behaviour

Many android notifications are opened and closed during sync. I looks like my phone goes crazy. Nextcloud is the first app that opens and closes this many notifications in short time.

Expected behaviour

There is one notification entry being updated with all the changes that occur during sync. No hundreds of notifications opened and closed.

Steps to reproduce

  1. Create a folder on server containing a lot of (small) files. Txt for example.
  2. Navigate with Nextcloud app to this folder.
  3. Long press this folder and select sync.
  4. Watch the notification bar of android. Many notifications are opened and closed. The phone looks like it goes crazy.

Environment data

Android version: 7.1.1

Device model: BQ X5 plus

Stock or customized system: Stock

Nextcloud app version: 1.4.2

Nextcloud server version: 11.0.3

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

enhancement needs infdiscussion

Most helpful comment

@jancborchardt, I agree that brevity is helpful. It would still be useful to resolve, briefly, a minimum set of behaviors before attempting an implementation.

I suggest the following:

  1. Show progress in terms of total transfer size, not just file count.
  2. Include notification for initial phase of comparing file information, in addition to the file transfer phase. Currently, the application stops responding during this part of the operation, and displays no user notification.
  3. Leave a notification, which persists until acknowledged, after the operation finishes, indicating final status.

All 23 comments

We talked already in some issues about enhancing/changing the way of notifications. Unfortunately I cannot find the issues right now.
There were two opposite ideas

  • show no notification, but instead have an upload view or include it in activity
  • keep notification, but enhance it and show e.g. [02/10] filename "20% @ 1.2Mb/s".

The notification is an interesting one and comes down to confidence; on most apps I really don't mind it not being there, Google Photos for example I know without a doubt that 1 or 1,000 photos everything will be uploaded so don't look for a notification. The NC app however being slightly less reliable to date, I'm far more confident it's working when I see it. For that reason today I'd opt for the enhancement, with the goal of removing it all together in the future.

I'd like to add that under certain circumstances the notifications can render the android device unusable. That happens if the server goes offline or becomes unreachable while syncing folders with very many files. Because of the current mechanism the app will create one notification for each failed download. That slows down the device considerably since it keeps trying to sync all the other files, creating more failure notifications.

This is also an issue from my point of view, see below a double notification during file download:
double notification screenshot_20171009-205805

One is a persistent notification aiding the app in staying in the foreground, the other is task specific. In English maybe it makes more sense?

  • Nextcloud is running
  • Uploading xxxx.xxx.xxx (or downloading, or syncing etc)

Hi, Thanks for this explanation.

As far as I understand there are 2 notifications for technical reasons but as a "end user", I wish to have 1 notification only maybe triggered by 2 differents events and with 2 "lines of information".

It is possible to update existing foreground notification. I use this small wrapper to display progress and protect my Service at the same time. It would be great if this app did the same thing.

As far as I remember we have two opposite ideas:

  • completely remove any notification
  • enhance notifications to use only one and update this, showing e.g. "downloading 1 of 10 files: name, percentage"

Like @jasonbayton said https://github.com/nextcloud/android/issues/1124#issuecomment-312520459:

For that reason today I'd opt for the enhancement, with the goal of removing it all together in the future.

@jancborchardt @mario @AndyScherzinger?

enhance notifications to use only one and update this, showing e.g. "downloading 1 of 10 files: name, percentage"

We should absolutely go for this. (I was under the assumption there’s a technical limitation keeping us from doing that.)

While this is indeed possible now, it won't be possible later on once we move away from Service-based uploads to a nicer, more robust jobs-based infrastructure. So not sure it's worth the time...

I assumed that jobs can still show some notifications?

Well, I guess they can do that - true. But why would I want a notification that files are being uploaded/failed/resumed/whatever is still beyond me. I only want a notification if something failed 3 times.

(Also it would be a different notification,not permanent one like it is now with Foreground service)

In general I would agree that notifications are only for errors. However with the scheduled instant (non-instant) upload, it's important to get feedback.

Also, the notification allows you to exit the app and do something else while still monitoring the status. It's essentially a tray icon which only shows on any other state than "synced".

@jancborchardt
As we need the notification for various advantages, could we still limit the number of notifications to one? This one notification could actualize information shown according current actions of the user...

I strongly agree with the original report, suggesting a single persistent notification during the course of a multi-file operation. I also suggest a notification following the end of the operation, indicating success or failure, that persists until dismissed.

I differ with various other suggestions represented later in the discussion, including no notifications, and as well, a notification that persists regardless of whether an operation is occurring. Further, whether the user has "confidence" in the application's stability is a red herring.

Notifications serve a proper and valuable function of indicating that some important state of the system differs from the norm that might otherwise be presumed, thus helping users to make important decisions about managing their devices.

Broadly, notifications are essential when they present a high likelihood of affecting a users decisions. In other cases, of course, they are little more than a nuisance.

A user who initiates a large transfer knows that data usage, battery life, and connectivity are all related to whether the operation succeeds, and which resources are expended to complete it. It is of tremendous value to indicate whether an operation is in progress, has succeeded, or has failed.

Of course, fine control over which notifications to suppress, according to user needs, is also useful.

TL;DR as said above in https://github.com/nextcloud/android/issues/1124#issuecomment-336170750

enhance notifications to use only one and update this, showing e.g. "downloading 1 of 10 files: name, percentage"

We should absolutely go for this. (I was under the assumption there’s a technical limitation keeping us from doing that.)

Just needs someone to implement it.

@jancborchardt, I agree that brevity is helpful. It would still be useful to resolve, briefly, a minimum set of behaviors before attempting an implementation.

I suggest the following:

  1. Show progress in terms of total transfer size, not just file count.
  2. Include notification for initial phase of comparing file information, in addition to the file transfer phase. Currently, the application stops responding during this part of the operation, and displays no user notification.
  3. Leave a notification, which persists until acknowledged, after the operation finishes, indicating final status.

Referencing issue #1532 stating a real-world-case of how it badly affects non-technical people.

How do you know this ticket will not be finished soon? Easy, the label "needs info/discussion" is still around.

So easy to fix, so long the discussion = no priority. NC android users, simply live with it.

No need for snarky comments – we are all in this community together. And if it’s easy to fix, then someone from this thread surely can contribute? :)

:heart:

Three months are a lot. What are three years? I thought this is somehow the official NC app. But no one cares...maybe I am just some kind of special user and upload too many files.

I switched to webdav based client. This ticket is from no interest. Closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments

Shagequi picture Shagequi  Â·  3Comments

ikke-t picture ikke-t  Â·  3Comments

daywalk3r666 picture daywalk3r666  Â·  3Comments

ezaquarii picture ezaquarii  Â·  3Comments