question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PushNotification.localNotificationSchedule isn't working on Android

See original GitHub issue

I’m running the following:

    PushNotification.configure({
        permissions: {
            alert: true,
            badge: true,
            sound: true
        },
        popInitialNotification: true,
        onNotification: function(notification) {
            console.log( 'NOTIFICATION:', notification );
        },
    });

// ...

    var message = "foo";
    PushNotification.localNotificationSchedule({
        message: message,
        date: new Date(Date.now() + (60 * 1000)),
    });

I’ve confirmed that date is correct. I’ve debugged into the java code in react-native-push-notification to confirm that the date received in java is correct. In sendNotificationScheduledCore(), getAlarmManager().setExact(...) doesn’t seem to be doing what it’s supposed to.

Local notifications that aren’t scheduled work fine.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
dfoverdxcommented, Apr 6, 2017

@diegocouto Ah, updating the manifest is probably my issue (can’t check right now because the rest of my project is completely b0rked on Android). I had thought react-native link took care of all of that. Thanks!

0reactions
github-actions[bot]commented, May 8, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PushNotification.localNotificationSchedule is not working ...
Here is my code, I try to fire it up with and without event but nothing seems to be happening, meanwhile PushNotification.
Read more >
react-native-push-notification - local notifications not working ...
Called when a remote is received or opened, or local notification is opened onNotification: function(notification) { console.
Read more >
marqroldan/react-native-push-notification - npm package - Snyk
Works natively in iOS. Uses the ShortcutBadger on Android, and as such will not work on all Android devices. Sending Notification Data From...
Read more >
Implementing React Native Push Notifications in Android Apps
You can add scheduled notifications by using the PushNotification.localNotificationSchedule(details: Object) method or you can repeat ...
Read more >
React Native Local Push Notifications | by Saad Khan - Medium
Basically, the push notification does not trigger from a cloud service, ... we need a demo app to show that our notifications are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found