-
Notifications
You must be signed in to change notification settings - Fork 212
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
Added a feature to disable notifications on Android #10
Added a feature to disable notifications on Android #10
Conversation
cb7f7af
to
531c491
Compare
What kind of notifications does this affect? I only see upload notification when syncing locations. |
This affects all notifications. So when disabling notifications - even upload notifications should not be visible |
Did you see a notification that this did not disable? (Other than debug: true notifications?) |
You're disabling upload notifications - that's OK But on https://github.com/mauron85/background-geolocation-android/pull/10/files#diff-39da09e20c965706fa858ed7384be0fdR339 you're only disabling changes to service notification. The notification will still be present. Don't think that's what you intended. Anyway removing service notification is bad thing, it will make service unreliable. |
Well if the notification did not exist at the time of the update to the notification, it will create it. To my understanding this is what the |
Now I got your point. This is the "foreground" service notification. Android requires it to make the service foreground... So I'm going to make a change, to make |
531c491
to
0f915ac
Compare
Done |
This looks OK, but why did you commented out tone generator? |
I think it's a residue from by debugging to see that no sounds were raised, I'll fix it right away |
0f915ac
to
7aa8b91
Compare
Done |
Merged. Thank you! |
@mauron85 @danielgindi If I want to actually run in the background, can this library let me? I understand what I'm doing and I'm ok with receiving updates only a few times an hour. Our Android users are paranoid and deleting the app in huge numbers. We'd rather have infrequent location updates than zero Android users. |
Please read the docs, especially on the several providers available. |
Thank you very much @danielgindi . It looks like the app always runs in Android as a "foreground service" as opposed to a background service. I'm commenting here because there was discussion about disabling the "foreground" notification. I'm trying to disable the "foreground service" notification, even if that means dealing with the strict limitations that Android 8 Oreo places on background services. Is that possible with this library? I know that it was on an older version before "experiemental oreo support" was added. For reference, here is my config:
|
It's not possible anymore to keep location updates running in the background and having no visible notification. The reasons are exactly those mentioned here by you and @danielgindi.
|
Android 8 works with scheduled Jobs now, no background services. |
Not everyone wants the library to force those notifications on them. There are other ways to convey to the user that the app is tracking in the background.
I have kept the original default where notifications are enabled, and it's an opt-out feature.
Set
notificationsEnabled: false
to disable local notifications.Also closes:
mauron85/react-native-background-geolocation#242