react-native-background-upload icon indicating copy to clipboard operation
react-native-background-upload copied to clipboard

Android notifications will not disable

Open aaronkaz opened this issue 4 years ago • 9 comments

This option:

notification: {
  enabled: false,
},

seems to make no difference whether I toggle true or false. I see Silent Notifications (SDK version 29) for all uploads regardless of the value. Any ideas how to turn these off?

As an alternative, I also tried:

notification: {
  enabled: true,
  autoclear: true
}

and still no effect.

aaronkaz avatar Sep 01 '20 21:09 aaronkaz

Same here. @aaronkaz did you solve this issue?

dolphinflow86 avatar Sep 23 '20 01:09 dolphinflow86

@dolphinflow86 No, I never did. This wasn't the only big issue I ran into, so I've just abandoned using this package altogether.

aaronkaz avatar Oct 02 '20 11:10 aaronkaz

On Android versions >= 8.0 Oreo it is required by Google's policy to display a notification when a background service (such as uploading a file in the background) runs

reime005 avatar Oct 02 '20 22:10 reime005

Same, Notifications show regardless of the notification.enabled parameter value.

imhoze avatar Oct 19 '20 00:10 imhoze

@reime005 isn't that only the case if you're using the Android File Manager? It should still be possible to do this with DOWNLOAD_WITHOUT_NOTIFICATION permission. Otherwise we would see even native apps going nuts when we upload files via apps

bneigher avatar Dec 07 '20 08:12 bneigher

Does anyone know how to contribute to the android native code here? I for the life of me can't figure out where to look to fix this

bneigher avatar Dec 10 '20 18:12 bneigher

@bneigher I don't think it is fixable...but the android code is in the /android folder if you mean that

reime005 avatar Dec 11 '20 12:12 reime005

I disabled it (it's kind of "disabled" - notification is removed right after a successful upload. The user almost doesn't notice it) with this combination of parameters:

notification: {
        enabled: true,
        autoClear: true,
      },

mar-bi avatar Aug 30 '21 12:08 mar-bi

I don't think it is fixable...but the android code is in the /android folder if you mean that

Notifications not autoClear, is persisted

AlexCernik avatar Feb 19 '22 19:02 AlexCernik