cordova-plugin-local-notifications
cordova-plugin-local-notifications copied to clipboard
Custom sound works on older devices, but not on newer ones. Also, vibration and LED color doesn't work in either case
## Your Environment
- Plugin version: 0.9.0-beta.3
- Platform: Android
- OS version: 11.0, 10.0, 6.0.1
- Device manufacturer / model: Samsung S21 (11.0), Samsung A10 (10.0), Samsung Note 4 (6.0.1), Samsung Galaxy Tab2 (7.0)
- Cordova version (
cordova -v
): 10.0.0 - Cordova platform version (
cordova platform ls
): 9.1.0 - Plugin config : --
- Ionic Version (if using Ionic): No
## Expected Behavior
App should give an instant notification upon app being opened, send out a custom sound, vibrate, and blink custom LED color
## Actual Behavior
App sends default notification sound, no vibration, no custom LED color -- on newer devices
## Steps to Reproduce
- Create new Project
- Add plugin via `cordova plugin add cordova-plugin-local-notification
- Add code inside
onDeviceReady()
function:
var sound = device.platform != 'iOS' ? 'file://audio/alarm.mp3' : 'content://audio/alarm.mp3'; cordova.plugins.notification.local.hasPermission(function (granted) { cordova.plugins.notification.local.schedule({ id: 1, channelDescription: "test", title: 'my title', text: 'place here any text', at: new Date().getTime(), sound: sound, priority: 0, count: 1, vibrate: true, led: { color: '#FF00FF', on: 500, off: 500 }, }); });
- Add Android Platform
cordova platform add android
- Run Android on device
## Context
When I run the app on a Samsung S21 (11.0) , a new Samsung A10 (10.0), custom sound doesn't play. Vibration doesn't work. And custom LED light doesn't flash
When I run the app on a Samsung Note 4 (6.0), and a Samsung Galaxy Tab S2 (7.0)
Also, adding a channel: 'NewChannel'
inside the cordova.plugins.notification.local.schedule
object makes the notification stop working all together, on all devices
## Debug logs
No errors given
Did you find any fix for that issue?
(Bump) @Betikyan Were you able to resolve this?