# CalendarContract.Calendars

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Calendars

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/provider/CalendarContract.Calendars "View this page in Java")  

```
class Calendars : BaseColumns, CalendarContract.CalendarColumns, CalendarContract.SyncColumns
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                             ||
| ↳ | [android.provider.CalendarContract.Calendars](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#) |

Constants and helpers for the Calendars table, which contains details for individual calendars.

### Operations

All operations can be done either as an app or as a sync adapter. To perform an operation as a sync adapter[CALLER_IS_SYNCADAPTER](https://developer.android.com/reference/kotlin/android/provider/CalendarContract#CALLER_IS_SYNCADAPTER:kotlin.String)should be set to true and[ACCOUNT_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_NAME:kotlin.String)and[ACCOUNT_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_TYPE:kotlin.String)must be set in the Uri parameters. See[Uri.Builder.appendQueryParameter(java.lang.String, java.lang.String)](https://developer.android.com/reference/kotlin/android/net/Uri.Builder.html#appendQueryParameter(kotlin.String,%20kotlin.String))for details on adding parameters. Sync adapters have write access to more columns but are restricted to a single account at a time. Calendars are designed to be primarily managed by a sync adapter and inserting new calendars should be done as a sync adapter. For the most part, apps should only update calendars (such as changing the color or display name). If a local calendar is required an app can do so by inserting as a sync adapter and using an[ACCOUNT_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_TYPE:kotlin.String)of[ACCOUNT_TYPE_LOCAL](https://developer.android.com/reference/kotlin/android/provider/CalendarContract#ACCOUNT_TYPE_LOCAL:kotlin.String).

**Insert**
:   When inserting a new calendar the following fields must be included:

    - [ACCOUNT_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_NAME:kotlin.String)
    - [ACCOUNT_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_TYPE:kotlin.String)
    - [NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#NAME:kotlin.String)
    - [CALENDAR_DISPLAY_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_DISPLAY_NAME:kotlin.String)
    - [CALENDAR_COLOR](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_COLOR:kotlin.String)
    - [CALENDAR_ACCESS_LEVEL](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_ACCESS_LEVEL:kotlin.String)
    - [OWNER_ACCOUNT](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#OWNER_ACCOUNT:kotlin.String)

    The following fields are not required when inserting a Calendar but are generally a good idea to include:

    <!-- -->

    - [SYNC_EVENTS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#SYNC_EVENTS:kotlin.String)set to 1
    - [CALENDAR_TIME_ZONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_TIME_ZONE:kotlin.String)
    - [ALLOWED_REMINDERS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_REMINDERS:kotlin.String)
    - [ALLOWED_AVAILABILITY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_AVAILABILITY:kotlin.String)
    - [ALLOWED_ATTENDEE_TYPES](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_ATTENDEE_TYPES:kotlin.String)

**Update**
:   To perform an update on a calendar the[_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String)of the calendar should be provided either as an appended id to the Uri ([ContentUris.withAppendedId](https://developer.android.com/reference/kotlin/android/content/ContentUris.html#withAppendedId(android.net.Uri,%20kotlin.Long))) or as the first selection item--the selection should start with "_id=?" and the first selectionArg should be the _id of the calendar. Calendars may also be updated using a selection without the id. In general, the[ACCOUNT_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_NAME:kotlin.String)and[ACCOUNT_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_TYPE:kotlin.String)should not be changed after a calendar is created as this can cause issues for sync adapters.

**Delete**
:   Calendars can be deleted either by the[_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String)as an appended id on the Uri or using any standard selection. Deleting a calendar should generally be handled by a sync adapter as it will remove the calendar from the database and all associated data (aka events).

**Query**
:   Querying the Calendars table will get you all information about a set of calendars. There will be one row returned for each calendar that matches the query selection, or at most a single row if the[_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String)is appended to the Uri.

### Calendar Columns

The following Calendar columns are writable by both an app and a sync adapter.

- [NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#NAME:kotlin.String)
- [CALENDAR_DISPLAY_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_DISPLAY_NAME:kotlin.String)
- [VISIBLE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#VISIBLE:kotlin.String)
- [SYNC_EVENTS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#SYNC_EVENTS:kotlin.String)

The following Calendars columns are writable only by a sync adapter

<!-- -->

- [ACCOUNT_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_NAME:kotlin.String)
- [ACCOUNT_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_TYPE:kotlin.String)
- [CALENDAR_COLOR](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_COLOR:kotlin.String)
- [_SYNC_ID](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#_SYNC_ID:kotlin.String)
- [DIRTY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#DIRTY:kotlin.String)
- [MUTATORS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#MUTATORS:kotlin.String)
- [OWNER_ACCOUNT](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#OWNER_ACCOUNT:kotlin.String)
- [MAX_REMINDERS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#MAX_REMINDERS:kotlin.String)
- [ALLOWED_REMINDERS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_REMINDERS:kotlin.String)
- [ALLOWED_AVAILABILITY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_AVAILABILITY:kotlin.String)
- [ALLOWED_ATTENDEE_TYPES](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_ATTENDEE_TYPES:kotlin.String)
- [CAN_MODIFY_TIME_ZONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAN_MODIFY_TIME_ZONE:kotlin.String)
- [CAN_ORGANIZER_RESPOND](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAN_ORGANIZER_RESPOND:kotlin.String)
- [CAN_PARTIALLY_UPDATE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#CAN_PARTIALLY_UPDATE:kotlin.String)
- [CALENDAR_LOCATION](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#CALENDAR_LOCATION:kotlin.String)
- [CALENDAR_TIME_ZONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_TIME_ZONE:kotlin.String)
- [CALENDAR_ACCESS_LEVEL](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_ACCESS_LEVEL:kotlin.String)
- [DELETED](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#DELETED:kotlin.String)
- [CAL_SYNC1](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC1:kotlin.String)
- [CAL_SYNC2](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC2:kotlin.String)
- [CAL_SYNC3](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC3:kotlin.String)
- [CAL_SYNC4](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC4:kotlin.String)
- [CAL_SYNC5](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC5:kotlin.String)
- [CAL_SYNC6](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC6:kotlin.String)
- [CAL_SYNC7](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC7:kotlin.String)
- [CAL_SYNC8](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC8:kotlin.String)
- [CAL_SYNC9](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC9:kotlin.String)
- [CAL_SYNC10](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC10:kotlin.String)

<br />

## Summary

|                                                                                                                                    Constants                                                                                                                                    ||
|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CALENDAR_LOCATION](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#CALENDAR_LOCATION:kotlin.String) The default location for the calendar.  |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DEFAULT_SORT_ORDER](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#DEFAULT_SORT_ORDER:kotlin.String) The default sort order for this table |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#NAME:kotlin.String) The name of the calendar.                                         |

| Inherited constants ||
|---|---|
| From class[SyncColumns](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns) |----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ACCOUNT_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_NAME:kotlin.String) <br /> The account that was used to sync the entry to the device. If the account_type is not[ACCOUNT_TYPE_LOCAL](https://developer.android.com/reference/kotlin/android/provider/CalendarContract#ACCOUNT_TYPE_LOCAL:kotlin.String)then the name and type must match an account on the device or the calendar will be deleted. Type: TEXT <br />                                                                                                                                                                                                                                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ACCOUNT_TYPE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_TYPE:kotlin.String) <br /> The type of the account that was used to sync the entry to the device. A type of[ACCOUNT_TYPE_LOCAL](https://developer.android.com/reference/kotlin/android/provider/CalendarContract#ACCOUNT_TYPE_LOCAL:kotlin.String)will keep this event form being deleted if there are no matching accounts on the device. Type: TEXT <br />                                                                                                                                                                                                                                         | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAN_PARTIALLY_UPDATE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#CAN_PARTIALLY_UPDATE:kotlin.String) <br /> If set to 1 this causes events on this calendar to be duplicated with[Events.LAST_SYNCED](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.EventsColumns#LAST_SYNCED:kotlin.String)set to 1 whenever the event transitions from non-dirty to dirty. The duplicated event will not be expanded in the instances table and will only show up in sync adapter queries of the events table. It will also be deleted when the originating event has its dirty flag cleared by the sync adapter. Type: INTEGER (boolean) <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DELETED](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#DELETED:kotlin.String) <br /> Whether the row has been deleted but not synced to the server. A deleted row should be ignored. Type: INTEGER (boolean) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [DIRTY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#DIRTY:kotlin.String) <br /> Used to indicate that local, unsynced, changes are present. Type: INTEGER (long) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MUTATORS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#MUTATORS:kotlin.String) <br /> Used in conjunction with[DIRTY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#DIRTY:kotlin.String)to indicate what packages wrote local changes. Type: TEXT <br />                                                                                                                                                                                                                                                                                                                                                                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_SYNC_ID](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#_SYNC_ID:kotlin.String) <br /> The unique ID for a row assigned by the sync source. NULL if the row has never been synced. This is used as a reference id for exceptions along with[BaseColumns._ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String). Type: TEXT <br />                                                                                                                                                                                                                                                                                           | ||
| From class[CalendarColumns](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns) |----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ALLOWED_ATTENDEE_TYPES](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_ATTENDEE_TYPES:kotlin.String) <br /> A comma separated list of attendee types supported for this calendar in the format "#,#,#". Valid types are[Attendees.TYPE_NONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.AttendeesColumns#TYPE_NONE:kotlin.Int),[Attendees.TYPE_OPTIONAL](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.AttendeesColumns#TYPE_OPTIONAL:kotlin.Int),[Attendees.TYPE_REQUIRED](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.AttendeesColumns#TYPE_REQUIRED:kotlin.Int),[Attendees.TYPE_RESOURCE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.AttendeesColumns#TYPE_RESOURCE:kotlin.Int). Setting this field to only[Attendees.TYPE_NONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.AttendeesColumns#TYPE_NONE:kotlin.Int)should be used to indicate that changing the attendee type is not supported. <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ALLOWED_AVAILABILITY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_AVAILABILITY:kotlin.String) <br /> A comma separated list of availability types supported for this calendar in the format "#,#,#". Valid types are[Events.AVAILABILITY_BUSY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.EventsColumns#AVAILABILITY_BUSY:kotlin.Int),[Events.AVAILABILITY_FREE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.EventsColumns#AVAILABILITY_FREE:kotlin.Int),[Events.AVAILABILITY_TENTATIVE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.EventsColumns#AVAILABILITY_TENTATIVE:kotlin.Int). Setting this field to only[Events.AVAILABILITY_BUSY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.EventsColumns#AVAILABILITY_BUSY:kotlin.Int)should be used to indicate that changing the availability is not supported. <br />                                                                                                                      | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ALLOWED_REMINDERS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#ALLOWED_REMINDERS:kotlin.String) <br /> A comma separated list of reminder methods supported for this calendar in the format "#,#,#". Valid types are[Reminders.METHOD_DEFAULT](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.RemindersColumns#METHOD_DEFAULT:kotlin.Int),[Reminders.METHOD_ALERT](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.RemindersColumns#METHOD_ALERT:kotlin.Int),[Reminders.METHOD_EMAIL](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.RemindersColumns#METHOD_EMAIL:kotlin.Int),[Reminders.METHOD_SMS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.RemindersColumns#METHOD_SMS:kotlin.Int),[Reminders.METHOD_ALARM](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.RemindersColumns#METHOD_ALARM:kotlin.Int). Column name. Type: TEXT <br />                                                                                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CALENDAR_ACCESS_LEVEL](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_ACCESS_LEVEL:kotlin.String) <br /> The level of access that the user has for the calendar Type: INTEGER (one of the values below) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CALENDAR_COLOR](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_COLOR:kotlin.String) <br /> The color of the calendar. This should only be updated by the sync adapter, not other apps, as changing a calendar's color can adversely affect its display. Type: INTEGER (color value) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CALENDAR_COLOR_KEY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_COLOR_KEY:kotlin.String) <br /> A key for looking up a color from the[Colors](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Colors)table. NULL or an empty string are reserved for indicating that the calendar does not use a key for looking up the color. The provider will update[CALENDAR_COLOR](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_COLOR:kotlin.String)automatically when a valid key is written to this column. The key must reference an existing row of the[Colors](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Colors)table. @see Colors Type: TEXT <br />                                                                                                                                                                                                                                                                                                            | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CALENDAR_DISPLAY_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_DISPLAY_NAME:kotlin.String) <br /> The display name of the calendar. Column name. Type: TEXT <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CALENDAR_TIME_ZONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_TIME_ZONE:kotlin.String) <br /> The time zone the calendar is associated with. Type: TEXT <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_CONTRIBUTOR](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_CONTRIBUTOR:kotlin.Int) <br /> Full access to modify the calendar, but not the access control settings <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_EDITOR](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_EDITOR:kotlin.Int) <br /> Full access to modify the calendar, but not the access control settings <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_FREEBUSY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_FREEBUSY:kotlin.Int) <br /> Can only see free/busy information about the calendar <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_NONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_NONE:kotlin.Int) <br /> Cannot access the calendar <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_OVERRIDE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_OVERRIDE:kotlin.Int) <br /> not used <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_OWNER](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_OWNER:kotlin.Int) <br /> Full access to the calendar <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_READ](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_READ:kotlin.Int) <br /> Can read all event details <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_RESPOND](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_RESPOND:kotlin.Int) <br /> Can reply yes/no/maybe to an event <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [CAL_ACCESS_ROOT](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAL_ACCESS_ROOT:kotlin.Int) <br /> Domain admin <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAN_MODIFY_TIME_ZONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAN_MODIFY_TIME_ZONE:kotlin.String) <br /> Can the organizer modify the time zone of the event? Column name. Type: INTEGER (boolean) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAN_ORGANIZER_RESPOND](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CAN_ORGANIZER_RESPOND:kotlin.String) <br /> Can the organizer respond to the event? If no, the status of the organizer should not be shown by the UI. Defaults to 1. Column name. Type: INTEGER (boolean) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [IS_PRIMARY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#IS_PRIMARY:kotlin.String) <br /> Is this the primary calendar for this account. If this column is not explicitly set, the provider will return 1 if[Calendars.ACCOUNT_NAME](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.SyncColumns#ACCOUNT_NAME:kotlin.String)is equal to[Calendars.OWNER_ACCOUNT](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#OWNER_ACCOUNT:kotlin.String). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [MAX_REMINDERS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#MAX_REMINDERS:kotlin.String) <br /> The maximum number of reminders allowed for an event. Column name. Type: INTEGER <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [OWNER_ACCOUNT](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#OWNER_ACCOUNT:kotlin.String) <br /> The owner account for this calendar, based on the calendar feed. This will be different from the _SYNC_ACCOUNT for delegated calendars. Column name. Type: String <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [SYNC_EVENTS](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#SYNC_EVENTS:kotlin.String) <br /> Is this calendar synced and are its events stored on the device? 0 - Do not sync this calendar or store events for this calendar. 1 - Sync down events for this calendar. Type: INTEGER (boolean) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [VISIBLE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#VISIBLE:kotlin.String) <br /> Is the calendar selected to be displayed? 0 - do not show events associated with this calendar. 1 - show events associated with this calendar Type: INTEGER (boolean) <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | ||
| From class[CalendarSyncColumns](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns) |----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC1](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC1:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC10](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC10:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC2](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC2:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC3](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC3:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC4](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC4:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC5](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC5:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC6](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC6:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC7](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC7:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC8](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC8:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CAL_SYNC9](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarSyncColumns#CAL_SYNC9:kotlin.String) <br /> Generic column for use by sync adapters. Column name. Type: TEXT <br />   | ||
| From class[BaseColumns](https://developer.android.com/reference/kotlin/android/provider/BaseColumns) |----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_COUNT](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_COUNT:kotlin.String) <br /> The count of rows in a directory. Type: INTEGER <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String) <br /> The unique ID for a row. Type: INTEGER (long) <br />         | ||

|                                                                                                                                                          Properties                                                                                                                                                           ||
|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)! | [CONTENT_URI](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#CONTENT_URI:android.net.Uri) The content:// style URL for accessing Calendars                                                    |
| static[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)  | [ENTERPRISE_CONTENT_URI](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#ENTERPRISE_CONTENT_URI:android.net.Uri) The content:// style URL for querying Calendars table in the managed profile. |

## Constants

### CALENDAR_LOCATION

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CALENDAR_LOCATION: String
```

The default location for the calendar. Column name.

Type: TEXT  

    Value: "calendar_location"

### DEFAULT_SORT_ORDER

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val DEFAULT_SORT_ORDER: String
```

The default sort order for this table  

    Value: "calendar_displayName"

### NAME

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val NAME: String
```

The name of the calendar. Column name.

Type: TEXT  

    Value: "name"

## Properties

### CONTENT_URI

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val CONTENT_URI: Uri!
```

The content:// style URL for accessing Calendars  

### ENTERPRISE_CONTENT_URI

Added in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val ENTERPRISE_CONTENT_URI: Uri
```

The content:// style URL for querying Calendars table in the managed profile. Appending a calendar id using[ContentUris.withAppendedId(Uri, long)](https://developer.android.com/reference/kotlin/android/content/ContentUris.html#withAppendedId(android.net.Uri,%20kotlin.Long))specifies a single calendar.

The following columns are allowed to be queried via this uri:

- [_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String)
- [CALENDAR_COLOR](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_COLOR:kotlin.String)
- [VISIBLE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#VISIBLE:kotlin.String)
- [CALENDAR_LOCATION](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.Calendars#CALENDAR_LOCATION:kotlin.String)
- [CALENDAR_TIME_ZONE](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#CALENDAR_TIME_ZONE:kotlin.String)
- [IS_PRIMARY](https://developer.android.com/reference/kotlin/android/provider/CalendarContract.CalendarColumns#IS_PRIMARY:kotlin.String)

[IllegalArgumentException](https://developer.android.com/reference/kotlin/java/lang/IllegalArgumentException.html#)is thrown if there exists columns in the projection of the query to this uri that are not contained in the above list.

This uri returns an empty cursor if the calling user is not a parent profile of a managed profile, or the managed profile is disabled, or cross-profile calendar is disabled in Settings, or this uri is queried from a package that is not allowed by the profile owner of the managed profile via[DevicePolicyManager.setCrossProfileCalendarPackages(ComponentName, Set)](https://developer.android.com/reference/kotlin/android/app/admin/DevicePolicyManager.html#setCrossProfileCalendarPackages(android.content.ComponentName,%20kotlin.collections.MutableSet)).

Apps can register a[android.database.ContentObserver](https://developer.android.com/reference/kotlin/android/database/ContentObserver.html#)for this URI to listen to changes.  
**See Also**

- [android.app.admin.DevicePolicyManager#getCrossProfileCalendarPackages(ComponentName)](https://developer.android.com/reference/kotlin/android/app/admin/DevicePolicyManager.html#getCrossProfileCalendarPackages(android.content.ComponentName))