语言

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

编辑者为: Panagiotis Sarridis 07 1月, 2019

响应

4 回复
new_to_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!

Panagiotis Sarridis

Hello, 

Unfortunatelly no progress. I am stuck. 

There is a post that reports the same issue for Native Applications as a bug on bugs.tizen.org:

https://bugs.tizen.org/plugins/servlet/mobile#issue/PTAPI-68

but the issue is still unresolved.

Jirka Prazak

I also tried the Calendar API using both web and the new .NET and it returns 3 calendar books for me, TODOs in addition to your two and also no events. So I wrote a little test where I created my own events using the new API. Those were stored and could later be retrieved, however they did not show up in the S3 Samsung calendar app.

It is likely that the Samsung app is proprietary and uses the Samsung Android app with its own cache on the watch and is not integrated with the Calendar API, at least not on Gear S3. Makes sense since the Samsung calendar app has been available since Tizen 2.3 that has no Calendar API on wearable profile. So you can use the API but you still have to get the original user calendar from somewhere else seems like.

Lewis Bowes

Hello,

Has anyone found a solution to this issue, or information that might get us closer? I can reproduce the same problem on a Samsung Galaxy Watch 3. I've followed the tutorials and can successfully add new events to the device's local calendar and retrieve those events later, but there is no communication with my Google Calendar (similar to Jirka Prazak). The returned events do not contain Google Calendar events and the new events added cannot be seen on my Google Calendar. Any information is appreciated.

Thanks