Calendar Application

Calendar Application

 

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

Algorithm:

 

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.

Steps:

 

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 CalendarApplicationActivity.java file and write following code there:

 

 

 

3.) Compile and build the project.

 

Output

 

 

 

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.

Comments 6

  1. Lokeswararao Gandreddi

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

  2. 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.

  3. 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.

    Thanks

  4. Hi,
    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?

    Thanks,
    Neet

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">