Calendar is the most common application that user uses daily. User can add his / her daily plans into it. Calendar can notice user for the upcoming events automatically. It is useful if an application can add an event to the Calendar app and remind user for the future event.

Android provides mainly two approaches to work on calendar event. One is using Calendar Provider and the another one is handing off it to the system Calendar app.

Calendar Provider provides us all the functionalities, including inserting, querying, updating and deleting existing calendar events. However, the steps are tedious and must require user’s runtime permissions ( android.permission.READ_CALENDAR and android.permission.WRITE_CALENDAR ) to read and write the sensitive calendar information. It is easy to make a mistake with this approach.

Quoted from Google official documentation of Calendar Provider

Therefore, Google officially recommends developer to use the second approach, i.e. handing off all the calendar operations to system Calendar app by using Intent . Calendar app is opened right after requested by our app and user is automatically redirected back to our app after user finishes his / her calendar actions. In system Calendar app, there has already been a well-designed UI for user to fill in necessary calendar information. Good UI and UX can then be guaranteed.

Example of system Calendar app in my Samsung device

This article will briefly cover: