O'Reilly logo

Android Recipes: A Problem-Solution Approach, Third Edition by Jeff Friesen, Dave Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7-13. Interacting with the Calendar

Problem

Your application needs to interact directly with the ContentProvider exposed by the Android framework to add, view, change, or remove calendar events on the device.

Solution

(API Level 14)

Use the CalendarContract interface to read/write data to the system’s ContentProvider for event data. CalendarContract exposes the API that is necessary to gain access to the device’s calendars, events, attendees, and reminders. Much like ContactsContract, this interface defines mostly the data that is necessary to perform queries. The methods used will be the same as when working with any other system ContentProvider.

How It Works

Working with CalendarContract is very similar to working with ContactsContract ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required