Android localNotificationSchedule wrong date
See original GitHub issueconst date = new Date(Date.now() + (25 * 1000))
console.log(`date test: ${date}`);
PushNotification.localNotificationSchedule({
id: '333',
title: 'Hey',
message: 'this is a msg!',
priority: "max",
autoCancel: false,
soundName: 'popcorn.mp3',
vibration: 30000,
date
});
"react-native": "0.58.4",
"react-native-push-notification": "^3.1.2",
Android 5.1
date is completely ignored and the notification arrives in a random time that can even reach 5 minutes instead of the 25 seconds provided.
am I doing something wrong? how can i solve it?
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
React native localNotificationSchedule not working for ...
I have tried to call localNotificationSchedule function to show different messages in different times in forEach loop and it works for android ......
Read more >flutter_local_notifications | Flutter Package - Pub.dev
A cross platform plugin for displaying and scheduling local notifications for Flutter applications with the ability to customise for each platform.
Read more >react-native-push-notification - npm
React Native Local and Remote Notifications for iOS and Android ... new Date(Date.now() + 60 * 1000), // in 60 secs allowWhileIdle: false, ......
Read more >React Native Local Push Notifications | by Saad Khan - Medium
We will be using a very good package called react-native-push-notification. In this post, I will be showing the android part, ...
Read more >nois/react-native-push-notification v3.1.4 - npm.io
React Native Local and Remote Notifications for iOS and Android ... < Only if you're using GCM or localNotificationSchedule() > --> <uses-permission ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got it solved by deleting all scheduled notification before adding new ones with same ids
PushNotification.cancelAllLocalNotifications()
issue is still happening in android if you use Date to set ‘date’ option in localNotificationSchedule, ios works fine but android doesn’t show notifications in right time