wix / react-native-notifications

React Native Notifications
MIT License
3.23k stars 763 forks source link

[Android][iOS] postLocalNotification dispatches immediately #926

Closed minhnc closed 1 year ago

minhnc commented 1 year ago

Hi, when scheduling a local notification, it dispatches notification instantly in Android 12. The same thing happens in iOS. What could be the reason? Has anyone experienced similar issue?

"react-native": "0.66.3",
"react-native-notifications": "4.3.3"

Sample code:

let date = new Date()
date.setMinutes(date.getMinutes() + 5)

Notifications.postLocalNotification({
    body: 'Local notification!',
    title: 'Title',
    fireDate: date,
})
Waltari10 commented 1 year ago

Not sure why it's not working on iOS, but at least the docs state that fireDate is not supported for Android at all yet: https://wix.github.io/react-native-notifications/docs/localNotifications

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 1 year ago

The issue has been closed for inactivity.