androidflutterfirebase-cloud-messagingflutter-notification

Flutter_Messaging Do Not Play Sound on a Real Android Phone


Currently, I have implemented the Firebase Cloud Messaging on my application. The notification is function in foreground and background.

When I run the app on emulator, the sound is play with the default music. Once I run on a real Android device, there is the notification but without any notification sound. Can someone show me where is the problems?


Solution

  • Set a higher priority in the JSON you send to the client, you have all the documentation here:

    https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message