Hi everyone,
I have an Ionic 3 App that I’m upgrading to Ionic 5 with capacitor 2.4.9 and I need to make the notifications logic working again. My main issue so far is that the custom sound I use for the notifications it’s not working.
I have created a custom channel and assigned to it a sound with max priority (5) as per below
this.push.createChannel({
id: ‘custom-channel’,
description: ‘my App Channel’,
importance: 5,
sound: ‘unconvinced’,
vibration: true,
badge: true
}).then((r) => console.log('APP COMPONENT CHANNEL CREATED? ', r));
the “unconvinced” file is an mp3 inside the assets/sound folder of my ionic and angular project.
The channel seems to be correctly created but when I receive the notification there is no sound.
I’m using ‘@ionic-native/push/ngx’ for the notifications.
This is my current Ionic configuration:
Ionic:
Ionic CLI : 5.4.16
Ionic Framework : @ionic/angular 5.8.5
@angular-devkit/build-angular : 0.1101.1
@angular-devkit/schematics : 13.0.1
@angular/cli : 11.2.15
@ionic/angular-toolkit : 2.3.3
Capacitor:
Capacitor CLI : 2.5.0
@capacitor/core : 2.5.0
Utility:
cordova-res : 0.15.3
native-run : 1.4.0
System:
NodeJS : v14.17.0 (C:\Program Files\nodejs\node.exe)
npm : 7.20.2
OS : Windows 10
Below my package.json:
“dependencies”: {
“@angular/common”: “~11.2.0”,
“@angular/core”: “~11.2.0”,
“@angular/forms”: “~11.2.0”,
“@angular/platform-browser”: “~11.2.0”,
“@angular/platform-browser-dynamic”: “~11.2.0”,
“@angular/router”: “~11.2.0”,
“@capacitor/android”: “^2.4.9”,
“@capacitor/core”: “^2.4.9”,
“@capacitor/ios”: “^2.4.9”,
“@ionic-native/core”: “^5.3.5”,
“@ionic-native/deeplinks”: “^5.3.5”,
“@ionic-native/fingerprint-aio”: “^5.3.5”,
“@ionic-native/in-app-browser”: “^5.3.5”,
“@ionic-native/market”: “^5.3.5”,
“@ionic-native/ms-adal”: “^5.3.5”,
“@ionic-native/push”: “^5.3.5”,
“@ionic/angular”: “^5.6.13”,
“@ionic/angular-toolkit”: “^2.3.3”,
“@ionic/storage”: “^3.0.6”,
“@ionic/storage-angular”: “^3.0.6”,
“cordova-plugin-fingerprint-aio”: “^4.0.2”,
“cordova-plugin-inappbrowser”: “^5.0.0”,
“cordova-plugin-market”: “^1.2.0”,
“cordova-plugin-ms-adal-is-back”: “^0.10.10”,
“cordova-sqlite-storage”: “^6.0.0”,
“crypto-js”: “^3.0.0”,
“es6-promise-plugin”: “^4.2.2”,
“ionic-plugin-deeplinks”: “^1.0.22”,
“jetifier”: “^2.0.0”,
“localforage-cordovasqlitedriver”: “^1.8.0”,
“ngx-pinch-zoom”: “^2.6.2”,
“phonegap-plugin-multidex”: “^1.0.0”,
“phonegap-plugin-push”: “^2.3.0”,
“rxjs”: “~6.6.3”,
“tslib”: “^2.3.0”,
“webpack-bundle-analyzer”: “^4.4.2”,
“zone.js”: “^0.11.4”
},
“devDependencies”: {
“@angular-devkit/build-angular”: “0.1101.1”,
“@angular-eslint/builder”: “1.2.0”,
“@angular-eslint/eslint-plugin”: “1.2.0”,
“@angular-eslint/eslint-plugin-template”: “1.2.0”,
“@angular-eslint/schematics”: “^2.1.0”,
“@angular-eslint/template-parser”: “1.2.0”,
“@angular/cli”: “~11.2.0”,
“@angular/compiler”: “~11.2.0”,
“@angular/compiler-cli”: “~11.2.0”,
“@angular/language-service”: “~11.2.0”,
“@capacitor/cli”: “^2.4.9”,
“@types/crypto-js”: “^3.1.47”,
“@types/jasmine”: “^3.8.2”,
“@types/jasminewd2”: “^2.0.10”,
“@types/node”: “^16.7.10”,
“@typescript-eslint/eslint-plugin”: “4.29.1”,
“@typescript-eslint/parser”: “4.29.1”,
“eslint”: “^7.29.0”,
“jasmine-core”: “~3.8.0”,
“jasmine-spec-reporter”: “~7.0.0”,
“karma”: “^5.2.0”,
“karma-chrome-launcher”: “~3.1.0”,
“karma-coverage-istanbul-reporter”: “~3.0.3”,
“karma-jasmine”: “^4.0.1”,
“karma-jasmine-html-reporter”: “^1.7.0”,
“protractor”: “~7.0.0”,
“ts-node”: “~10.2.0”,
“typescript”: “~4.0.0”
}
Thanks in advance for your help.
1 post - 1 participant