Vydia / react-native-background-upload

Upload files in your React Native app even while it's backgrounded. Supports Android and iOS, including camera roll assets.
MIT License
723 stars 330 forks source link

Android notifications will not disable #214

Open aaronkaz opened 4 years ago

aaronkaz commented 4 years ago

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.

dolphinflow86 commented 3 years ago

Same here. @aaronkaz did you solve this issue?

aaronkaz commented 3 years ago

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

reime005 commented 3 years ago

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

imhoze commented 3 years ago

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

bneigher commented 3 years ago

@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 commented 3 years ago

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

reime005 commented 3 years ago

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

mar-bi commented 3 years ago

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,
      },
AlexCernik commented 2 years ago

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