Problem that Firebase Push Notification play first sound in the raw folder for phones above SDK 26
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 25/100
Piste de recherche
Aucun fichier du dépôt ni aucun test n’est nommé. Commencez par le payload de remoteMessage.notification et comparez le chemin des canaux de notification d’Android 8+ utilisant chan.setSound avec l’ancien chemin du constructeur de notification utilisant setSound. Reproduisez le problème avec les raw sounds indiqués et vérifiez que le son demandé par le serveur, plutôt que la première ressource raw, est lu sur chaque version d’Android.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Firebase Push Notification play first a sound at raw for phones above SDK 26.
- raw
- car_park_empty.m4a
- car_park_full.m4a
remoteMessage.notification
{
"sound":"car_park_full",
"android_channel_id":"default_channel_id",
"data":{"carParkStatus":"true"}
}
playing a sound for android 8 and above
soundUri = if (aioNotification.carparkStatus) {
Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"+ context.packageName + "/" + R.raw.car_park_empty_tr);
} else {
Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"+ context.packageName + "/" + R.raw.car_park_full_tr);
}
}
val attributes = AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_NOTIFICATION)
.build()
if (soundUri != null) {
chan.setSound(
soundUri,
attributes
)
}
playing a sound for android 8 and below
var soundUri: Uri? = null
if (aioNotification.carparkStatus != null) {
soundUri = if (aioNotification.carparkStatus) {
Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"+ context.packageName + "/" + R.raw.car_park_empty_tr);
} else {
Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"+ context.packageName + "/" + R.raw.car_park_full_tr);
}
}
if (soundUri != null) {
notificationCompatBuilder.setSound(soundUri)
}
but notification just play first sound in the raw folder.
example -->
- raw
- car_park_full.m4a
play => car_park_full
- raw
- car_park_empty.m4a
- car_park_full.m4a
play => car_park_empty
remoteMessage.notification
{
"sound":"car_park_full",
"android_channel_id":"default_channel_id",
"data":{"carParkStatus":"true"}
}
- raw
- abcde.m4a
- bcdea.m4a
- yery.m4a
Assuming that notification comes this way and that the raw folder is that way.
The sound that plays is abcde.m4a. So It's sound where first index in the raw folder.
Notification was sent from server.
Sound value was sent as 'car_park_full.m4a' from server but Sound value came as 'car_park_full' to client.
Does anyone know what the reason is?
- Langage dominant
- Kotlin
- Étoiles
- 9.3k
- Forks
- 7.4k
- Merge moyen
- 7 j 9 h
- PR mergées (30 j)
- 6
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de firebase/quickstart-android
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
firebase/quickstart-android#2756 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
firebase/quickstart-android#2754 · 5 commentaires · 1 réaction ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 32/100
firebase/quickstart-android#2668 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
firebase/quickstart-android#2663 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
firebase/quickstart-android#1669 · 3 commentaires ·
Toutes les issues de firebase/quickstart-android
Issues similaires
-
android:plan main:plan packages:learn
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 1 jour
-
Needs Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
ankidroid/Anki-Android#23453 ·
Les mainteneurs répondent en général sous 1 jour
-
afk-ok area:data-quality importer size:S
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
enorm-labs/event-junkie#5278 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
bazel-contrib/rules_kotlin#1846 ·
Les mainteneurs répondent en général sous 2 jours