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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
android, firebase
Ambito
mobile

Direzione di ricerca

Inizia con il Firebase Cloud Messaging notification payload e il file custom.mp3 in /res/raw, quindi confronta il comportamento quando si fa targeting di API 23 e API 26 su Android O. Il lavoro è completato quando una notifica in background che utilizza l’attuale notification message riproduce il suono personalizzato senza richiedere una modifica lato server a un data message.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

api: messaging type: question

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.

Lingua principale
Kotlin
Stelle
9.3k
Fork
7.4k
Merge medio
7g 9h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/quickstart-android

Tutte le issue di firebase/quickstart-android

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.