I\'m currently using firebase messaging cloud to push notification for my app. I\'m trying to make a custom notification sound for the push notification. I believe that it c
you can do this simply by calling the sound and playing it in the firebase configure method.
widget._firebaseMessaging.configure(
onMessage: (Map message) async {
print('on message $message');
AudioCache player = new AudioCache();
const alarmAudioPath = "sounds/notification.mp3";
player.play(alarmAudioPath);
},
onResume: (Map message) async {
print('on resume $message');
},
onLaunch: (Map message) async {
print('on launch $message');
},
);
this wouldnt be effective as the file wouldnt be played if the app is in the background