zo0r / react-native-push-notification

React Native Local and Remote Notifications
MIT License
6.77k stars 2.05k forks source link

Scheduled Notifications not mute when I press the lock button at android #1604

Open MostafaFarrag2 opened 4 years ago

MostafaFarrag2 commented 4 years ago

Bug

react: 16.8.1 => 16.8.1 
react-native: 0.61.2 => 0.61.2

"react-native-push-notification": "^3.5.2",

I use the all code from example but I custom the sound while I use scheduled notification I need to disable the sound or mute it when I press lock button or volume button. how can I do it

var d = new Date() d.setHours(hour) d.setMinutes(min) PushNotification.localNotificationSchedule({ //... You can use all the options from localNotifications message: "message", // (required) date: d, id: '30', playSound: true, // (optional) default: true soundName: alarmsound, });

Dallas62 commented 4 years ago

Hi, Sounds are mute if you are using do not disturb. The version you are using (3.5.2) was the one you fixed DND, but if you made your application before, you may have the bug (channel already created).

MostafaFarrag2 commented 4 years ago

Hi, Sounds are mute if you are using do not disturb. The version you are using (3.5.2) was the one you fixed DND, but if you made your application before, you may have the bug (channel already created). thats not what I mean , my question is i need to silent the notification sound after it works with lock buttons .

sapna179 commented 3 years ago

Bug

react: 16.8.1 => 16.8.1 
react-native: 0.61.2 => 0.61.2

"react-native-push-notification": "^3.5.2",

I use the all code from example but I custom the sound while I use scheduled notification I need to disable the sound or mute it when I press lock button or volume button. how can I do it

var d = new Date() d.setHours(hour) d.setMinutes(min) PushNotification.localNotificationSchedule({ //... You can use all the options from localNotifications message: "message", // (required) date: d, id: '30', playSound: true, // (optional) default: true soundName: alarmsound, });

Facing same problem, Notifications sound not muting when I press the lock button in android device.

"react": "16.13.1", "react-native": "0.63.1", "react-native-push-notification": "^7.3.1",