firebase / firebase/quickstart-android

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

Open
#754 2 comments 0 reactions 0 assignees View on GitHub
api: messaging type: question
Dominant language
Kotlin
Stars
9.3k
Forks
7.4k
Avg merge
2d 19h
Merged PRs (30d)
8

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.