I have a sound file in the app bundle, i want to play that sound file when user will get push notification.
IS it possible in iOS if yes, then please suggest the way to achieve this.
Thanks,
On Android devices, it is possible to choose individual push notification sounds.
To play this sound you must specify the filename of the sound in the notification payload. For example, lets say you've added a sound file named example.caf into your application, we can play this sound with the notification payload as below:
{
aps =
{
alert = "test example notification message";
sound = "example.caf";
};
}
Then the custom sound will play when your notification arrives.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With