question

Vic-3381 avatar image
0 Votes"
Vic-3381 asked ryanchill edited

Custom sound for receiving notification

I am getting push notification in background mode and in killed mode as well but I am not able to play the custom sound which is defined in the notification payload body in background and killed mode.

dotnet-xamarinazure-notification-hubs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered

Hi @Vic-3381,

Forgive me I misunderstood your question, but I don't believe your notification message could (or should) contain the payload for the actual sound. The sound should be an asset in your app package.

I did see https://stackoverflow.com/a/43284214/10987310 which contains a code snippet of how to play a custom sound with a notification. If you include the name of the sound file in the payload and use it to make the resource Uri.

Regards,
Ryan

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.