Skip to content

Is there a way to customize the sound for notification message on Android O and above? #754

@ZoroYouth

Description

@ZoroYouth

The push message is like

"notification" : {
      "body" : "This is a Firebase Cloud Messaging",
      "title" : "FCM Message",
      "sound":"custom"
}

And the custom.mp3 is in /res/raw
It works fine when my project target api 23, but it does not work when target api 26 on Android O.
Both target api 23 and target api 26, the notifications are shown by the system if the app is in background. I don't know what has changed on Android O.
I don't want to change the notification message to data message on the server side because it affects a lot. Is there an easy way to solve the issue?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions