Languages

Menu
Sites
Language
Using Tizen Calendar API returns calendars with NO events

Hello
I am working on a web application and i would like to get all events from calendar and use their details. 
I installed my application on my Galaxy Watch device.
On my Galaxy watch device, in the pre-installed calendar application, all events from my Google Calendar are synchonised correctly and i can see them on the pre-installed calendar widget. 

The problem is that when i run my application on my Galaxy watch, i get 2 calendars that have NO events.

I am using Tizen calendar API as it is descriped on tizen developers site:
https://developer.tizen.org/development/guides/web-application/personal-data/calendar?langswitch=en
see the code i have attached. 
I get 2 calendars:
1. Default event calendar
2. Default birthday calendar
when i try to get the events on each one of them i get that there are 0 events.

Is this a bug or am i doing something wrong?
Shouldn't Tizen Calendar API also return the Google Calendar events since they are synced with the device's pre-installed calendar application?

 

Here is the javascript code i use:

// Gets a list of available calendars. 
tizen.calendar.getCalendars("EVENT", calendarListCallback, errorCallback);
 
// Defines the error callback. 
function errorCallback(response) {
       console.log("The following error occurred: " + response.name);
}
 
// Defines the success callback. 
function calendarListCallback(calendars) {
     // How many calendars exist
    console.log("Calendars length: " + calendars.length);
     if (calendars.length > 0) {
              for (var i = 0; i < calendars.length; i++) {
                     calendar = calendars[i];
                     // Gets the id and name of each calendar
                     console.log("Calendar id: " + calendar.id + " Name: " + calendar.name);
                     // Gets the number of all events in each calendar
                     calendar.find(eventSearchSuccessCallback);
                     function eventSearchSuccessCallback(events) {
                          console.log("Events length: " + events.length);
                     }
             }
       }
}


Here is the Console Log i get:

Calendars length: 2
Calendar id: 1 Name: Default event calendar
Events length: 0
Calendar id: 3 Name: Default birthday calendar
Events length: 0

Edited by: Παναγιώτης Σαρρίδης on 07 Jan, 2019

Responses

1 Replies
tizen

Hello,

did you have any luck with this in the meantime?

I am having the same problem, and don't know what to do.

Cheers!