Calendar Application Control – VIEW (event)

How to handle calendar events in your own application using the device's Calendar application. - using aliased application ID of "tizen.calendar". - VIEW (event) operation displays a calendar event from the device calendar.
function eventSearchSuccessCallback(events) {
    var eventType = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/social/item_type", ["event"]);
    var itemId = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/social/item_id", [events[0].id.uid]);
    var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/social/view", null, null, null, [eventType, itemId]);
        	
    tizen.application.launchAppControl(appControl, "tizen.calendar", 
        function() {	
            console.log("launch appControl succeeded");
        }, function(e) {
            /* Error handling */
        }, null);
}
var calendar = tizen.calendar.getDefaultCalendar("EVENT");
var filter = new tizen.AttributeFilter('description', 'CONTAINS', 'Tizen');
calendar.find(eventSearchSuccessCallback, null, filter, null);

Responses

0 Replies