NativeScript / NativeScript/plugins
@nativescript/local-notifications custom sound not working
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 206
- Forks
- 123
- Merge medio
- 2 d 1 h
- PR fusionados (30 d)
- 1
Descripción
Hi All, I've been trying to look out for a solution on the internet, and even tried to understand the source code with no avail.
I'm trying to schedule a local notifications as follows
LocalNotifications.schedule([ {
id: id,
title: `Some title`,
sound: 'res://silent.wav',
ongoing: true,
notificationLed: false,
forceShowWhenInForeground: false,
priority: 0,
actions: actions,
icon: 'res://icon',
} ])
and the notification is displayed correctly. And that's fine. The only problem is that the sound file which I am specifying is not being played, and instead the default android notification sound of the device is playing.
I've even tried using silent.wav and silent as values... I even tried passing <any>null as indicated in the README but nothing worked.
The silent.wav file is located in App_Resources/Android/src/main/res/raw and App_Resources/iOS respectively
Something worth mentioning is that I've been trying this out on Android 11.
Any help and pointers would be greatly appreciated.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el README de local-notifications y la implementación de Android, usando la llamada de programación reportada y Android 11 como caso de reproducción. Comprueba cómo se gestiona el valor de App_Resources/Android/src/main/res/raw/silent.wav; se considera hecho cuando la notificación programada reproduce el sonido personalizado especificado en lugar del sonido predeterminado del dispositivo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- android, typescript
- Área
- mobile-dev
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100