Custom sound for notification in not working android 6

Please provide the following:

  1. SDK Version: 44
  2. Platforms(Android/iOS/web/all): Android
  3. #notifications

I am trying to play custom sound when receiving notification. I am using eas build. I have added a wav sound in the following location: “./assets/sounds/notification_message.wav”. I added it to app.json using the expo-notification config plugin, then created a custom-dev client using eas build -p android --profile development.

The problem is that when sending a push notification using fcm or scheduling a notification with the sound property: “notification_message.wav”, the message is received but no sound. I am testing on android 6, so there is no channelId is needed as mention in the documentation.

expo prebuild shows that it is found in res/raw

Hey @ramiel99, can you let me know what device(s) you’ve tested and reproduced the no-sound issue on?

samsung galaxy note 4

In our development, we were able to get notification sounds using a channel, BUT only if the notification json did NOT include a “sound” attribute. The “sound” attribute suppressed all sounds. This was in Android 9.

yeah I am aware that it could work with android channels, but the problem is that android 7.1 and lower dont support channels and you have to pass the sound prop. I found that if you pass vibrate property the sound works, but that doesnt make sense and seem like a bug

Interesting tidbit about the vibrate property - I hadn’t observed that.

I thought my experience might shed some light on what’s broken. But I realize it dosen’t actually help any with your particular situation.

I agree, it seems like a bug.

–Laura

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.