plugins
plugins copied to clipboard
@nativescript/local-notifications custom sound not working
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.
up, problems that are still not resolved up to the current version