transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.65k stars 425 forks source link

Disable Notifications Prop Missing - I'm Already using Notifee #2128

Closed GaboMonchis closed 1 month ago

GaboMonchis commented 2 months ago

Your Environment

BackgroundGeolocation.setConfig({
          notification: {
            sticky: false,
          },
        });

Expected Behavior

I would like a Property to disable notifications in the app and handle the notification service myself with another library.

Actual Behavior

I get notifications from Firebase on a version that I don't want notifications. The only notification I would like to have is the sticky one that its indicating that we are tracking the device location, but not the ones that are coming from firebase to be handled from this library.

Steps to Reproduce

  1. Have the this library installed and configurated on a normal scenario
  2. Send a Firebase notification to a device.
  3. You get to see notifications from firebase.

Context

I would like from this lib to only have the notifications that says that we are tracking the users location and nothing more.

Debug logs

Logs ``` I don't have any logs that are valuable. ```
christocracy commented 2 months ago

I don't understand your problem. This plugin has nothing to do with firebase notifications.

Explain your problem with a screenshot.

GaboMonchis commented 2 months ago

Without ANY library that shows notification other than this one I get: IMG-20240828-WA0014

GaboMonchis commented 2 months ago

That is a notification from Firebase, the service is running but for this specific production version it shouldn't be showing notifications. The library is somehow showing notifications that it shouldn't show. This happens only with certain devices for example with Nokia G21 (weird device if you ask me) or Samsung A23

GaboMonchis commented 2 months ago

It's even worse if I want to add notifee to listen to firebase, cause I get double notifications, the one from notifee and the one from this library.

christocracy commented 2 months ago

If you want to share the plugin's notification, its notificationId is hard-coded to 9942585. You would have to configure other notification systems to use that notificationId.

You would also probably have to configure all notifications to use the same Notification.channelId