No sound when message sent from firebase console when app is closed

1.5k Views Asked by At

My code is ditto same as provided by fcm docs I am recieving notification when app is closed without using intent extras or any php code.

when app is in foreground onMessageRecieved() method gets invoked so i get default sound but when app is in background or closed i dont get sound.

i am using one phone and firebase console to send message thats it no php scripts or http requests

my phone setting has max volume for notification

1

There are 1 best solutions below

2
On

From your firebase console (Notifications), go to Advanced options > Sound > Enable - before sending every message. Thus you'll get sound even if your app is in background. Here's a screenshot

enter image description here