Calendar Module Working In Titanium

I’ve been searching all over for a working module but none actually requested access before implementing so none worked. Found a great and simple calendar module and I just implemented the explicit code of prompting a user to allow calendar access. Works like a charm. I’m using it for an app where I need to store events silently without opening the calendar app.

Module link:
https://github.com/alanleard/Titanium-Calendar

Request code for access to Calendar:

if(Ti.Calendar.eventsAuthorization == Ti.Calendar.AUTHORIZATION_AUTHORIZED) {
   // performCalendarReadFunctions();
} else {
    Ti.Calendar.requestEventsAuthorization(function(e){
        if (e.success) {
           alert('You have granted access to the calendar');
            //performCalendarReadFunctions();
        } else {
            alert('Access to calendar is not allowed');
        }
    });
 
}

Leave a Reply

Your email address will not be published. Required fields are marked *