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.

The alarm is not working

See original GitHub issue

I tried to add an calendar event with alarm: RNCalendarEvents.saveEvent(Alert for taking pills, { notes: data[1], description: data[2], startDate: start, endDate: end, recurrence: ‘daily’, calendar: [‘Calendar’], alarm: [{ date: -1 }], }) .then(id => { // we can get the event ID here if we need it }).catch(error => console.log('Save Event Error: ', error));

Then in the system calendar, I can see the event is created, however, the alert is none. Also there is no notification/alert one minus before the event starts. Am I doing something wrong in creating the event? Thanks.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

6reactions
apppro123commented, Apr 28, 2019

Can someone pls add this in the description, it would be very helpful! (I have also run in this issue! )

5reactions
geastwoodcommented, Jul 19, 2018

From what I see from the source code, on iOS the date needs to be iso string, however on Android, the date needs to be number (which is used as minutes, e.g. given date: 2, in Android it will convert to 2 minutes before)

It’s better to do a branching on Platform, e.g.

[
        {
            date:
                Platform.OS === 'ios'
                    ? moment(startsOnDate)
                          .subtract(2, 'hours')
                          .toISOString()
                    : moment.duration(2, 'hours').asMinutes(),
        }
]
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix phone alarm not working - Carlcare
How to fix phone alarm not working · Restart the phone · Turn up the alarm volume · Check Do Not Disturb ·...
Read more >
7 Ways to Troubleshoot If Your iPhone Alarm Isn't Going Off
Double-check the alarm settings · Use an Apple Watch? Check your settings there · Check your alarm volume · Make sure your phone...
Read more >
iPhone Alarm Not Working? Here's Why & The Fix!
Open Clock and tap the Alarm tab at the bottom of the screen. Then, tap Edit in the upper left-hand corner and tap...
Read more >
How to Fix an iPhone Alarm That's Not Going Off - Lifewire
Turn up the Volume · Reboot Your iPhone · Pick a Louder Alarm Sound · Check the Alarm's Time Settings · Disable or...
Read more >
Alarm Didn't Go Off on Your Android Phone? Here's How to Fix It
1. Restart Your Phone · 2. Check the Alarm Volume and Tone · 3. Clear the Clock App Cache · 4. Uninstall Updates...
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