I want a custom sound for a scheduled notification with the sound parameter. I expect it to play the sound when local notification goes off, but I just get the default notification sound on device.
Here’s everything that I’ve tried so far: (These are the ‘solutions’ I found across the internet)
- Custom sound works with no problem on iOS
- Tried using another device and doesn’t work on there too.
- Tried using different versions of local-notifications, android platform, etc
“ionic-native/local-notifications”: “^4.7.0”, - current one I’m using,
android 6.4.0 - current one I’m using
- Verified that sound file is indeed in www folder, also tried putting it in a sounds folder within assets, like I found on a tutorial
- Used @ionic-native/native-audio to play the sound file so I can verify that the sound file works and can be reached by the app.
- Used cordova-plugin-filepath to first get the file path of the file before using it to schedule a local notification
- I tried scheduling my local notification with a slight delay with the trigger parameter
- I tried different file paths both in www and assets/sounds/ using file://,file:///, media://, content://, etc
Here’s a bit of code:
title: ‘Balance Changed:’,
Here is my ionic info:
cli packages: (C:\Users\isaganiesteron\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
cordova (Cordova CLI) : not installed
@ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.4.0
Ionic Framework : ionic-angular 3.4.2
Android SDK Tools : 26.1.1
Node : v8.11.1
npm : 5.8.0
OS : Windows 10
ANDROID_HOME : C:\Users\isaganiesteron\AppData\Local\Android\Sdk
backend : pro
Let me know of any additional information I need to put.
Thank you very much.