Closed musawarbilal786 closed 6 months ago
So I'm trying to implement a custom alarm app that could schedule alarm and then run a push notification with custom sound on a scheduled time.
I am using React-Native-Push-Notification for my Alarm APP, everything is working fine but in silent mode, it does not play Alarm sound.
I'm scheduling Alarm by using PushNotification.localNotificationSchedule()
Here is code of localNotificationSchedule:
PushNotification.localNotificationSchedule({ channelId: "alarm-channel", title: alarmNotifData.title, id: alarmNotifData.id, message: alarmNotifData.message, date: alarmNotifData.fire_date, actions: ["Snooze", "Stop Alarm"], importance: Importance.HIGH, playSound: true, soundName: "default", allowWhileIdle: true, invokeApp: false, });
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Question
So I'm trying to implement a custom alarm app that could schedule alarm and then run a push notification with custom sound on a scheduled time.
I am using React-Native-Push-Notification for my Alarm APP, everything is working fine but in silent mode, it does not play Alarm sound.
I'm scheduling Alarm by using PushNotification.localNotificationSchedule()
Here is code of localNotificationSchedule:
PushNotification.localNotificationSchedule({ channelId: "alarm-channel", title: alarmNotifData.title, id: alarmNotifData.id, message: alarmNotifData.message, date: alarmNotifData.fire_date, actions: ["Snooze", "Stop Alarm"], importance: Importance.HIGH, playSound: true, soundName: "default", allowWhileIdle: true, invokeApp: false, });