I am using Firebase push notifications in my Android App. I can send correctly notification with custom icon, but I have not managed to play my custom sound. I always get th
From the documentation, include the sound in notification object under android object. Give name of the sound file in sound value. The sound files must reside in /res/raw/ . Below is a Node.js example:-
var message = {
notification: {
title: 'sample title',
body: 'Hello, its Tuesday.',
},
android: {
ttl: 3600 * 1000,
notification: {
icon: 'my_icon',
color: '#f45342',
sound: 'filename.mp3',
},
},
apns: {
payload: {
aps: {
badge: 42,
},
},
},
topic: 'industry-tech'
};