Steffaan / cordova-plugin-local-notifications

Cordova Local Notifications Plugin
Apache License 2.0
31 stars 38 forks source link

Sound is always muted even if I set priority 2 #12

Closed azhar0406 closed 5 years ago

azhar0406 commented 5 years ago

WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue.

Your Environment

Expected Behavior

Whenever notification triggered, a custom sound has to play.

Actual Behavior

Whenever notification triggered there is no sound coming

Steps to Reproduce

cordova.plugins.notification.local.schedule({ title: 'Order is about to expire', channel: 'PS', channelDescription: 'Order is about to expire', text: 'within 10 minutes', data: { id: 'yes', type: 'text', visit: 'first' }, led: { color: '#FFFFFF', on: 500, off: 500 }, vibrate: false, sticky: true, // Only use this is you want your notification to be sticky / ongoing! lockscreen: true, // Only use this if you want the notification to be shown in lockscreen! foreground: false, priority: 2, icon: 'file://img/notification-icon.png', smallIcon: 'res://mipmap-xxxhdpi/icon.png', actions: [ { id: 'yes', title: 'Extend Now', launch: true } ], sound: 'file://audio/bell.mp3', // trigger: { at: new Date(2019, 01, 19, 00, 57) } // trigger: { at: new Date(year1, month1, day1, hour1, minute1) } trigger: { every: 'minute', count: 5 } });

Context

Trigger local notification with an event whenever the user has booked the order (note: I set to trigger every minute to check the trigger response for testing)

Note: in my mobile's notification setting I can directly go and enable sound means it's coming but by default it's not coming

azhar0406 commented 5 years ago

Changed channel name, resolved this issue. Thank you