calendar.getEvents returns 0

Hi.

I’m trying to create a new function for my app to add events automatic to my calendar.

adding works fine, it will add the event (using calendar.addEvent()). I can see the event created on my smartphone calendar.

The problem is if I hit the same button it will add another same event to the same date. so I thought…easy…I will just use calendar.getEvents…compare the returned table to my added event and if they are the same it means it already exists so I will not add another one.

the problem is, I can’t manage to get any value from calendar.getEvents. I tried also creating my own events directly on the smartphone but it still returns 0 values.

my smartphone is htc u11 with android 8.0 running build 2018.3247.

could not try on any other device since I don’t have more here at the moment.

Regards,

Carlos.

almost seeing the light…the problem is on startDate and endDate. i need to test it more. i’ve enlarged the dates to search now it shows events. so for know i don’t need help. but testing is a pain since i can’t do it simulator

Are you using Live Builds? This will simplify your device builds to work much like simulator builds but on the device.

Rob

almost seeing the light…the problem is on startDate and endDate. i need to test it more. i’ve enlarged the dates to search now it shows events. so for know i don’t need help. but testing is a pain since i can’t do it simulator

Are you using Live Builds? This will simplify your device builds to work much like simulator builds but on the device.

Rob