firebase / firebase/quickstart-android

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

Aperta
#754 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
api: messaging type: question
Lingua principale
Kotlin
Stelle
9.3k
Fork
7.4k
Merge medio
2g 19h
PR unite (30g)
8

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.