Calendar Application


This example explains how to call and use system calendar into your application.



1.)   Create a new project by File-> New -> Android Project name it CalendarApplication.

2.)   Write following into main.xml file:





3.)   Put INTERNET permission to manifest file:




4.)   Run for output.



1.) Create a project named CalendarApplication and set the information as stated in the image.

Build Target: Android 4.0

Application Name: CalendarApplication

Package Name: com. example. CalendarApplication

Activity Name: CalendarApplicationActivity

Min SDK Version: 14

2.) Open file and write following code there:




3.) Compile and build the project.






5.)   If your phone doesn’t have any default calendar installed you will see the screen as below. Follow the instructions and see your calendar.

Leave a Comment:

Lokeswararao Gandreddi says August 6, 2012

Why It was not supporting in Emulator, It show setup couldn’t finish… I tried to create account, But it shows above error message.

Billy says October 18, 2012

Thank you for sharing superb informations. Your website is very cool. I’m impressed by the details that you’ve on this website. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found simply the information I already searched all over the place and just could not come across. What a great site.

ganesh says April 11, 2013

its working good with google calendars. thanks. need to make it working in hour level.

vijaya says September 12, 2013

How can i add calendar please tel me

Pierre says November 4, 2013

Hey Chetana,

Thanks for posting this demo. I have an error on this code: “setContentView(R.layout.main); ” It’s compalining about main not defined. Where do I define it.


Neet says February 4, 2015

How do i add the calendar on the emulator? The emulator already has a calendar, but not sure how to add it? Can we use that Calendar instead?


Add Your Reply