firebase / firebase/quickstart-android
Is there a way to customize the sound for notification message on Android O and above?
- Lenguaje dominante
- Kotlin
- Estrellas
- 9.3k
- Forks
- 7.4k
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 8
Descripción
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.
Guía de contribución
Línea de trabajo
Comienza con el Firebase Cloud Messaging notification payload y el archivo custom.mp3 en /res/raw; después, compara el comportamiento al apuntar a API 23 y API 26 en Android O. Se considera completado cuando una notificación en segundo plano que utiliza el notification message existente reproduce el sonido personalizado sin requerir un cambio del lado del servidor a un data message.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- android, firebase
- Área
- mobile
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100