cordova-plugin-local-notifications icon indicating copy to clipboard operation
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

Open Betikyan opened this issue 3 years ago • 2 comments

## 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

  1. Create new Project
  2. Add plugin via `cordova plugin add cordova-plugin-local-notification
  3. 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 }, }); });

  1. Add Android Platform cordova platform add android
  2. 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

Betikyan avatar Dec 03 '21 20:12 Betikyan

Did you find any fix for that issue?

fgarciaand avatar May 13 '22 23:05 fgarciaand

(Bump) @Betikyan Were you able to resolve this?

ppetree avatar Feb 22 '24 14:02 ppetree