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

Code that setting NotificationChannel sound on Android might lead unexpected consequences #1026

Open
impodracer opened this issue Jan 13, 2024 · 1 comment

Comments

@impodracer
Copy link

impodracer commented Jan 13, 2024

I'm using react-native-notifications to create notification channel on android. But some users using Android app complained about notification, something like "I can receive notifications but it doesn't sound". So I struggled to find out why but cannot find out what's going on there.

After some investigations, I found out that setSound() method in lib/android/app/src/main/java/com/wix/reactnativenotifications/core/notification/NotificationChannel.java passes null into soundAttribute parameter.
Screenshot 2024-01-13 at 5 16 20 PM

(compared below: same code in notifee/react-native is setting soundAttribute parameter)
Screenshot 2024-01-13 at 5 16 01 PM

I'm not good at android so I cannot pick exact cause and consequences, but there might be some differences, and reasons that some user complained about notification sounds.

@impodracer
Copy link
Author

impodracer commented Jan 13, 2024

I know it's not good reference, but I asked Google Bard about this. -- Sorry, I was desparate :(
https://g.co/bard/share/80b658b9e410

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

No branches or pull requests

1 participant