I am using react-native-firebase for a voice call app. I tried to create an incoming call notification as below:
const notification = new firebase.notifications.Notification()
.setTitle("Incoming call")
.android.setAutoCancel(true)
.android.setCategory("call")
.setSound('default')
.setBody("Test User");
const channel = new firebase.notifications.Android.Channel('test-channel', 'Test Call Channel', firebase.notifications.Android.Importance.Max)
.setDescription('Test call channel')
.setSound('default');
firebase.notifications().android.createChannel(channel);
notification.android.setChannelId(channel._channelId)
.android.setSmallIcon('ic_launcher');
firebase.notifications().displayNotification(notification);
But still, the notification sound is default message notification sound.
Also tried changing the category as "alarm".
Also tried adding an mp3 file in "res/raw" folder and used setSound("ring.mp3")
package.json details:
{
.
.
"react-native-firebase": "^5.6.0",
"react": "16.9.0",
"react-native": "0.61.5",
.
.
}
Can anyone help with this?