zo0r / react-native-push-notification

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

Scheduled notification set for tomorrow is not coming #2362

Open lutfullo777 opened 1 year ago

lutfullo777 commented 1 year ago

Question

This is my code: PushNotification.localNotificationSchedule({ channelId: 'channelId, message: "Notificataion is come", largeIcon: 'ic_launcher_foreground', smallIcon: 'ic_small_icon', title: "Notification", date: new Date(Date.now() + 24x3600x1000), allowWhileIdle: true, });

but working for today

I don't use repeatType: "day".

Shivampurbia commented 1 year ago
    PushNotification.localNotificationSchedule({
        channelId: 'hello',
        message: "Medicine alarm!!", // (required)
        date: new Date(Date.now() + reminderTime),
        allowWhileIdle: true, // (optional) set notification to work while on doze, default: false
        repeatType: 'day',

    });

you would need to add repeatType: 'day', otherwise it won't work. i have tested this by changing the date to tommorow it will send you the notification on the exact time.

github-actions[bot] commented 4 weeks ago

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.