Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

calendar.getEvents returns 0
Started by carloscosta Mar 28 2018 02:35 AM

2 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

carloscosta

[GLOBAL: userInfoPane.html]
carloscosta
  • Contributor

  • 649 posts
  • Corona SDK

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.



[TOPIC: post.html]
#2

carloscosta

[GLOBAL: userInfoPane.html]
carloscosta
  • Contributor

  • 649 posts
  • Corona SDK

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



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,925 posts
  • Enterprise

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

 

Rob




[topic_controls]
[/topic_controls]