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

can you identify what change enables sound? #2

Open
leachus opened this issue Mar 7, 2023 · 6 comments
Open

can you identify what change enables sound? #2

leachus opened this issue Mar 7, 2023 · 6 comments

Comments

@leachus
Copy link

leachus commented Mar 7, 2023

This is an excellent demo of how to set up FCM push notifications.

Can you share what specifically you changed in this setup to resolve the problem of notifications failing to make a sound?

I compared all 9 steps in the readme to my project, and I don't see any differences that I would expect to affect whether push makes a sound. I'm hoping you can point me to what you did that fixed the silent notifications.

Thank you!

@itsramiel
Copy link
Owner

Hey. What exactly is your issue? Do you get no sound at all when you receive a notification?

@leachus
Copy link
Author

leachus commented Mar 7, 2023

Thanks for the quick response. That's right - no sound at all - neither my custom sound nor the default beep.

I understood the issue you reported at expo/expo#16447 a year ago to be the same problem, so I was delighted to see that you had it working. Your setup looks very similar to mine. But it's not clear to me what you changed to fix the sound.

@itsramiel
Copy link
Owner

I just asked my backend colleague who has the payloads being sent to ios and android. I can share them with you.

I remember tweaking them from the ones shown in the guide. I will share them with you as soon as I get a response.

@leachus
Copy link
Author

leachus commented Mar 7, 2023

Shoot. That sounds like your solution is to modify the payload? I hoped from looking at your example that you might have a way to avoid having to do that.

Either way, I very much appreciate your helping figure out what the options are.

@itsramiel
Copy link
Owner

AS far as I remember the payload shown in the guide should work. You should receive the notification with the appropriate sound. The issue with the one in the guide is that expo was not picking it up, so you can't listen inside the app when a user receives/interacts with a notification. I believe it is because expo-notifications expects a specific payload.

But if your issue is that you are not getting any sound, then I guess you have a different issue. Are you sure that the sounds are being bundled in the app? You set them up correctly.

@leachus
Copy link
Author

leachus commented Mar 7, 2023

It does sound like a different issue. My problem is that we have sites with older versions of our server software that send the sound attribute in the payload, and counterintuitively, when the payload has a sound attribute, no sound is produced. The app has the correct sound files, and if the server sends the payload the app wants, it makes the sound. It looks like there’s no getting around making every site update their server software.

Again, thanks for all the information you’ve provided.

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

2 participants