Skip to content

Commit

Permalink
Merge commit '9ca18b1e575f2c71cde4b74a929041e55bec3c78' into dev
Browse files Browse the repository at this point in the history
* commit '9ca18b1e575f2c71cde4b74a929041e55bec3c78':
  Add help about local notifications problems
  • Loading branch information
Dallas62 committed Aug 31, 2020
2 parents ee6a62e + 9ca18b1 commit 67c5dde
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions trouble-shooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ Known bugs and issues:
* (Android) Tapping an alert in the notification centre will sometimes not result in `onNotification` being called [issue 281](https://github.com/zo0r/react-native-push-notification/issues/281)
* (Android) Not all local notification features are supported yet (PRs welcome)
* (iOS) The OS can penalise your app for not calling the completion handler and will stop (or delay) sending notifications to your app. This will be supported from RN-0.38 [PR 227](https://github.com/zo0r/react-native-push-notification/pull/277)
* (Android and iOS) Don't use a string to get the date for schedule a local notification, it only works with remote debugger enabled, [explanation](https://stackoverflow.com/a/41881765/8519917).


```javascript
// It doesn't works with the javascript engine used by React Native
const date = new Date("10-10-2020 12:30");
```
A good practice to get valid date could be:

```javascript
// Get date to schedule a local notification today at 12:30:00
const hour = 12;
const minute = 30;
const second = 0;
const now = new Date();
const date = new Date(
now.getFullYear(),
now.getMonth(),
now.getDate(),
hour,
minute,
second
);
```

# Android tips

Expand Down

0 comments on commit 67c5dde

Please sign in to comment.