0

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?

1
  • same here, also no vibrate, need help
    – Jim
    Nov 25, 2020 at 10:07

1 Answer 1

0

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

2
  • Do you have any sample format to put the priority when sending the notification? I have try a few way but it still doesn't work.
    – CLKH
    Nov 26, 2020 at 8:22
  • Solution is found and the format should be data:{notification:{sound: default, ...}}
    – CLKH
    Nov 27, 2020 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.