Skip to content
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

Disabled notification sound and vibration on oreo #9

Merged

Conversation

danielgindi
Copy link
Contributor

In Oreo you can't count on the notification's defaults, or even settings that you've set explicitly, because the NotificationChannel is pre-defined with an annoying sound and vibration.
This is too alarming to the user, and happens multiple times.

This fixes the behavior on Oreo.

Closes: mauron85/react-native-background-geolocation#260

@danielgindi danielgindi changed the title Disabled notification sound and vibration on oreo (Closes #260) Disabled notification sound and vibration on oreo Aug 20, 2018
@mauron85
Copy link
Owner

mauron85 commented Aug 20, 2018

I would prefer making this configurable.

@danielgindi
Copy link
Contributor Author

This would involve a much deeper change, as registerAllChannels then should be not static, and depending on config

@danielgindi
Copy link
Contributor Author

I think we should start with this, to supply the default expected behavior. I'm not familiar with the library so much that I'd feel comfortable changing it's structure yet.

@mauron85
Copy link
Owner

Ok. Let's see.

@mauron85 mauron85 merged commit bd4f6c8 into mauron85:master Aug 20, 2018
@mauron85
Copy link
Owner

Merged. Thank you!

mauron85 added a commit to mauron85/react-native-background-geolocation that referenced this pull request Aug 20, 2018
mauron85 added a commit to mauron85/cordova-plugin-background-geolocation that referenced this pull request Aug 20, 2018
@danielgindi danielgindi deleted the bugfix/oreo_notification_sound branch August 21, 2018 06:53
@djereg
Copy link

djereg commented Aug 21, 2018

Still plays notification sound. Tested on Galaxy S8 Oreo 8.0 and Emulator API 26.

@danielgindi
Copy link
Contributor Author

I'm afraid it will not work for applications that are already installed, as notification channels are only created once. Creating them again does not update them.

@djereg
Copy link

djereg commented Aug 21, 2018

Yes, reinstall was solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable Notification Sound and Vibration in Android
3 participants