-
Notifications
You must be signed in to change notification settings - Fork 17
How to use custom notification sound?
For playing custom sounds, make sure you have sound file in your application project to be able to target it by sending a message.
Check the cases when your custom sound won't be played.
Place custom sound files in your project in res/raw
directory. If the folder does not exist, create it. Make sure that your file is in one of the supported audio formats.
In order for custom notification sound to be played by the OS, you need to send message by API with the name of the sound (with or without extension) by using soundName
parameter in notificationOptions
.
MM SDK builds notification in notification centre by using default device sound. Default sound is played if:
- custom sound name isn't set in send message API request
Sound will not be played if:
- sound file targeted by API is not found by the provided name (valid name:
my_sound.wav
) - sound file is not valid - file is of wrong extension
NOTE: Prerequisite for playing any sound is that sound is enabled for device and for your application.
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
Geofencing API- DEPRECATED- Android Manifest components
- Privacy settings
- In-app chat
- Infobip RTC calls and UI
- Backup rules