Open stereodenis opened 4 years ago
same issue having. any solution
It seems that setting alarms with numbers does not works on Android.
This will not work on Android:
alarms = [
{
date: 60
}
]
Change it to iso format worked for me.
let alarmDate = new Date(eventDate - 60 * 60000);
console.log(alarmDate);
eventOptions.alarms = [
{
date: alarmDate.toISOString()
}
];
Does anyone would like to improve android behaviour ?
Just adding to this thread here: We don't experience crashes, but we do have difficulties with alarms on calendar events on Android. They work fine on iOS, but seem to be missing on Android. Is at least what I thought until I looked at the same event in the Google Calendar web app where I saw that an alarm was indeed associated with the event, but didn't show up in the Google Calendar Android app.
Android app | Web app |
---|---|
Just putting this info out here in case that it helps understanding the issue for whoever might tackle it.
EDIT: If you use a negative number for alarms
on Android and a positive on iOS it seems to fix the issue
Crash on: Sony Xperia XZ1 Sony Xperia XZ2 Xiaomi Mi A2 Lite Xiaomi Mi A1 ONEPLUS A6000 OnePlus5 OnePlus3T Google Pixel XL LG Nexus 5X (Android 8)
Environment
Steps to Reproduce
save event with alarms:
Expected Behavior
event is saved
Actual Behavior
Crash