# CalendarContract

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Nested Classes](https://developer.android.com/reference/android/provider/CalendarContract#nestedclasses)\|[Constants](https://developer.android.com/reference/android/provider/CalendarContract#constants)\|[Fields](https://developer.android.com/reference/android/provider/CalendarContract#lfields)\|[Methods](https://developer.android.com/reference/android/provider/CalendarContract#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/provider/CalendarContract#inhmethods)  

# CalendarContract

*** ** * ** ***

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

`
public

final

class
CalendarContract
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|-----------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.CalendarContract |

<br />

*** ** * ** ***

<br />

The contract between the calendar provider and applications. Contains definitions for the supported URIs and data columns.

### Overview

CalendarContract defines the data model of calendar and event related information. This data is stored in a number of tables:

- The[Calendars](https://developer.android.com/reference/android/provider/CalendarContract.Calendars)table holds the calendar specific information. Each row in this table contains the details for a single calendar, such as the name, color, sync info, etc.
- The[Events](https://developer.android.com/reference/android/provider/CalendarContract.Events)table holds the event specific information. Each row in this table has the info for a single event. It contains information such as event title, location, start time, end time, etc. The event can occur one-time or can recur multiple times. Attendees, reminders, and extended properties are stored on separate tables and reference the[Events._ID](https://developer.android.com/reference/android/provider/BaseColumns#_ID)to link them with the event.
- The[Instances](https://developer.android.com/reference/android/provider/CalendarContract.Instances)table holds the start and end time for occurrences of an event. Each row in this table represents a single occurrence. For one-time events there will be a 1:1 mapping of instances to events. For recurring events, multiple rows will automatically be generated which correspond to multiple occurrences of that event.
- The[Attendees](https://developer.android.com/reference/android/provider/CalendarContract.Attendees)table holds the event attendee or guest information. Each row represents a single guest of an event. It specifies the type of guest they are and their attendance response for the event.
- The[Reminders](https://developer.android.com/reference/android/provider/CalendarContract.Reminders)table holds the alert/notification data. Each row represents a single alert for an event. An event can have multiple reminders. The number of reminders per event is specified in[Calendars.MAX_REMINDERS](https://developer.android.com/reference/android/provider/CalendarContract.CalendarColumns#MAX_REMINDERS)which is set by the Sync Adapter that owns the given calendar. Reminders are specified in minutes before the event and have a type.
- The[ExtendedProperties](https://developer.android.com/reference/android/provider/CalendarContract.ExtendedProperties)table holds opaque data fields used by the sync adapter. The provider takes no action with items in this table except to delete them when their related events are deleted.

Other tables include:

- [SyncState](https://developer.android.com/reference/android/provider/CalendarContract.SyncState), which contains free-form data maintained by the sync adapters

<br />

## Summary

|                                                                                                             ### Nested classes                                                                                                             ||
|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class`     | [CalendarContract.Attendees](https://developer.android.com/reference/android/provider/CalendarContract.Attendees) Fields and helpers for interacting with Attendees.                                                         |
| ` interface` | [CalendarContract.AttendeesColumns](https://developer.android.com/reference/android/provider/CalendarContract.AttendeesColumns) Columns from the Attendees table that other tables join into themselves.                     |
| ` class`     | [CalendarContract.CalendarAlerts](https://developer.android.com/reference/android/provider/CalendarContract.CalendarAlerts) Fields and helpers for accessing calendar alerts information.                                    |
| ` interface` | [CalendarContract.CalendarAlertsColumns](https://developer.android.com/reference/android/provider/CalendarContract.CalendarAlertsColumns) <br />                                                                             |
| ` class`     | [CalendarContract.CalendarCache](https://developer.android.com/reference/android/provider/CalendarContract.CalendarCache) CalendarCache stores some settings for calendar including the current time zone for the instances. |
| ` interface` | [CalendarContract.CalendarCacheColumns](https://developer.android.com/reference/android/provider/CalendarContract.CalendarCacheColumns) <br />                                                                               |
| ` interface` | [CalendarContract.CalendarColumns](https://developer.android.com/reference/android/provider/CalendarContract.CalendarColumns) Columns specific to the Calendars Uri that other Uris can query.                               |
| ` class`     | [CalendarContract.CalendarEntity](https://developer.android.com/reference/android/provider/CalendarContract.CalendarEntity) Class that represents a Calendar Entity.                                                         |
| ` interface` | [CalendarContract.CalendarSyncColumns](https://developer.android.com/reference/android/provider/CalendarContract.CalendarSyncColumns) Generic columns for use by sync adapters.                                              |
| ` class`     | [CalendarContract.Calendars](https://developer.android.com/reference/android/provider/CalendarContract.Calendars) Constants and helpers for the Calendars table, which contains details for individual calendars.            |
| ` class`     | [CalendarContract.Colors](https://developer.android.com/reference/android/provider/CalendarContract.Colors) Fields for accessing colors available for a given account.                                                       |
| ` interface` | [CalendarContract.ColorsColumns](https://developer.android.com/reference/android/provider/CalendarContract.ColorsColumns) <br />                                                                                             |
| ` class`     | [CalendarContract.EventDays](https://developer.android.com/reference/android/provider/CalendarContract.EventDays) Fields and helpers for querying for a list of days that contain events.                                    |
| ` interface` | [CalendarContract.EventDaysColumns](https://developer.android.com/reference/android/provider/CalendarContract.EventDaysColumns) <br />                                                                                       |
| ` class`     | [CalendarContract.Events](https://developer.android.com/reference/android/provider/CalendarContract.Events) Constants and helpers for the Events table, which contains details for individual events.                        |
| ` interface` | [CalendarContract.EventsColumns](https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns) Columns from the Events table that other tables join into themselves.                              |
| ` class`     | [CalendarContract.EventsEntity](https://developer.android.com/reference/android/provider/CalendarContract.EventsEntity) Class that represents an Event Entity.                                                               |
| ` class`     | [CalendarContract.ExtendedProperties](https://developer.android.com/reference/android/provider/CalendarContract.ExtendedProperties) Fields for accessing the Extended Properties.                                            |
| ` interface` | [CalendarContract.ExtendedPropertiesColumns](https://developer.android.com/reference/android/provider/CalendarContract.ExtendedPropertiesColumns) <br />                                                                     |
| ` class`     | [CalendarContract.Instances](https://developer.android.com/reference/android/provider/CalendarContract.Instances) Fields and helpers for interacting with Instances.                                                         |
| ` class`     | [CalendarContract.Reminders](https://developer.android.com/reference/android/provider/CalendarContract.Reminders) Fields and helpers for accessing reminders for an event.                                                   |
| ` interface` | [CalendarContract.RemindersColumns](https://developer.android.com/reference/android/provider/CalendarContract.RemindersColumns) <br />                                                                                       |
| ` interface` | [CalendarContract.SyncColumns](https://developer.android.com/reference/android/provider/CalendarContract.SyncColumns) Columns for Sync information used by Calendars and Events tables.                                      |
| ` class`     | [CalendarContract.SyncState](https://developer.android.com/reference/android/provider/CalendarContract.SyncState) A table provided for sync adapters to use for storing private sync state data.                             |

|                                                                                                                                                                                                                                                  ### Constants                                                                                                                                                                                                                                                  ||
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [ACCOUNT_TYPE_LOCAL](https://developer.android.com/reference/android/provider/CalendarContract#ACCOUNT_TYPE_LOCAL) A special account type for calendars not associated with any account.                                                                                                                                                                                                                                                    |
| [String](https://developer.android.com/reference/java/lang/String) | [ACTION_EVENT_REMINDER](https://developer.android.com/reference/android/provider/CalendarContract#ACTION_EVENT_REMINDER) Broadcast Action: This is the intent that gets fired when an alarm notification needs to be posted for a reminder.                                                                                                                                                                                                 |
| [String](https://developer.android.com/reference/java/lang/String) | [ACTION_HANDLE_CUSTOM_EVENT](https://developer.android.com/reference/android/provider/CalendarContract#ACTION_HANDLE_CUSTOM_EVENT) Activity Action: Display the event to the user in the custom app as specified in[EventsColumns.CUSTOM_APP_PACKAGE](https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns#CUSTOM_APP_PACKAGE).                                                                          |
| [String](https://developer.android.com/reference/java/lang/String) | [ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT](https://developer.android.com/reference/android/provider/CalendarContract#ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT) Action used to help apps show calendar events in the managed profile.                                                                                                                                                                                                    |
| [String](https://developer.android.com/reference/java/lang/String) | [AUTHORITY](https://developer.android.com/reference/android/provider/CalendarContract#AUTHORITY) This authority is used for writing to or querying from the calendar provider.                                                                                                                                                                                                                                                              |
| [String](https://developer.android.com/reference/java/lang/String) | [CALLER_IS_SYNCADAPTER](https://developer.android.com/reference/android/provider/CalendarContract#CALLER_IS_SYNCADAPTER) An optional insert, update or delete URI parameter that allows the caller to specify that it is a sync adapter.                                                                                                                                                                                                    |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_CUSTOM_APP_URI](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_CUSTOM_APP_URI) Intent Extras key:[EventsColumns.CUSTOM_APP_URI](https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns#CUSTOM_APP_URI)for the event in the[ACTION_HANDLE_CUSTOM_EVENT](https://developer.android.com/reference/android/provider/CalendarContract#ACTION_HANDLE_CUSTOM_EVENT)intent |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_EVENT_ALL_DAY](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_ALL_DAY) Intent Extras key: When creating an event, set this to true to create an all-day event by default                                                                                                                                                                                                                      |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_EVENT_BEGIN_TIME](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_BEGIN_TIME) Intent Extras key: The start time of an event or an instance of a recurring event.                                                                                                                                                                                                                               |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_EVENT_END_TIME](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_END_TIME) Intent Extras key: The end time of an event or an instance of a recurring event.                                                                                                                                                                                                                                     |
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_EVENT_ID](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_ID) Intent Extras key: An extra of type`long`holding the id of an event.                                                                                                                                                                                                                                                             |

|                                                                                                                        ### Fields                                                                                                                         ||
|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public static final `[Uri](https://developer.android.com/reference/android/net/Uri) | [CONTENT_URI](https://developer.android.com/reference/android/provider/CalendarContract#CONTENT_URI) The content:// style URL for the top-level calendar authority |

|                                                                                                                                                                                                                                 ### Public methods                                                                                                                                                                                                                                 ||
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static boolean` | ` `[startViewCalendarEventInManagedProfile](https://developer.android.com/reference/android/provider/CalendarContract#startViewCalendarEventInManagedProfile(android.content.Context,%20long,%20long,%20long,%20boolean,%20int))`(`[Context](https://developer.android.com/reference/android/content/Context)` context, long eventId, long startMs, long endMs, boolean allDay, int flags) ` Starts an activity to view calendar events in the managed profile. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### ACCOUNT_TYPE_LOCAL

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

```
public static final String ACCOUNT_TYPE_LOCAL
```

A special account type for calendars not associated with any account. Normally calendars that do not match an account on the device will be removed. Setting the account_type on a calendar to this will prevent it from being wiped if it does not match an existing account.

<br />

**See also:**

- [CalendarContract.SyncColumns.ACCOUNT_TYPE](https://developer.android.com/reference/android/provider/CalendarContract.SyncColumns#ACCOUNT_TYPE)

Constant Value: "LOCAL"  

### ACTION_EVENT_REMINDER

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

```
public static final String ACTION_EVENT_REMINDER
```

Broadcast Action: This is the intent that gets fired when an alarm notification needs to be posted for a reminder.

<br />

Constant Value: "android.intent.action.EVENT_REMINDER"  

### ACTION_HANDLE_CUSTOM_EVENT

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

```
public static final String ACTION_HANDLE_CUSTOM_EVENT
```

Activity Action: Display the event to the user in the custom app as specified in[EventsColumns.CUSTOM_APP_PACKAGE](https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns#CUSTOM_APP_PACKAGE). The custom app will be started via[Activity.startActivityForResult(Intent, int)](https://developer.android.com/reference/android/app/Activity#startActivityForResult(android.content.Intent,%20int))and it should call[Activity.setResult(int)](https://developer.android.com/reference/android/app/Activity#setResult(int))with[Activity.RESULT_OK](https://developer.android.com/reference/android/app/Activity#RESULT_OK)or[Activity.RESULT_CANCELED](https://developer.android.com/reference/android/app/Activity#RESULT_CANCELED)to acknowledge whether the action was handled or not. The custom app should have an intent filter like the following:  

```
 <intent-filter>
    <action android:name="android.provider.calendar.action.HANDLE_CUSTOM_EVENT" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="vnd.android.cursor.item/event" />
 </intent-filter>
```

Input:[Intent.getData](https://developer.android.com/reference/android/content/Intent#getData())has the event URI. The extra[EXTRA_EVENT_BEGIN_TIME](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_BEGIN_TIME)has the start time of the instance. The extra[EXTRA_CUSTOM_APP_URI](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_CUSTOM_APP_URI)will have the[EventsColumns.CUSTOM_APP_URI](https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns#CUSTOM_APP_URI).

Output:[Activity.RESULT_OK](https://developer.android.com/reference/android/app/Activity#RESULT_OK)if this was handled; otherwise[Activity.RESULT_CANCELED](https://developer.android.com/reference/android/app/Activity#RESULT_CANCELED).

<br />

Constant Value: "android.provider.calendar.action.HANDLE_CUSTOM_EVENT"  

### ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT

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

```
public static final String ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT
```

Action used to help apps show calendar events in the managed profile.

<br />

Constant Value: "android.provider.calendar.action.VIEW_MANAGED_PROFILE_CALENDAR_EVENT"  

### AUTHORITY

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

```
public static final String AUTHORITY
```

This authority is used for writing to or querying from the calendar provider. Note: This is set at first run and cannot be changed without breaking apps that access the provider.

<br />

Constant Value: "com.android.calendar"  

### CALLER_IS_SYNCADAPTER

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

```
public static final String CALLER_IS_SYNCADAPTER
```

An optional insert, update or delete URI parameter that allows the caller to specify that it is a sync adapter. The default value is false. If set to true, the modified row is not marked as "dirty" (needs to be synced) and when the provider calls[ContentResolver.notifyChange(android.net.Uri, android.database.ContentObserver, boolean)](https://developer.android.com/reference/android/content/ContentResolver#notifyChange(android.net.Uri,%20android.database.ContentObserver,%20boolean)), the third parameter "syncToNetwork" is set to false. Furthermore, if set to true, the caller must also include[Calendars.ACCOUNT_NAME](https://developer.android.com/reference/android/provider/CalendarContract.SyncColumns#ACCOUNT_NAME)and[Calendars.ACCOUNT_TYPE](https://developer.android.com/reference/android/provider/CalendarContract.SyncColumns#ACCOUNT_TYPE)as query parameters.

<br />

**See also:**

- [Uri.Builder.appendQueryParameter(java.lang.String, java.lang.String)](https://developer.android.com/reference/android/net/Uri.Builder#appendQueryParameter(java.lang.String,%20java.lang.String))

Constant Value: "caller_is_syncadapter"  

### EXTRA_CUSTOM_APP_URI

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

```
public static final String EXTRA_CUSTOM_APP_URI
```

Intent Extras key:[EventsColumns.CUSTOM_APP_URI](https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns#CUSTOM_APP_URI)for the event in the[ACTION_HANDLE_CUSTOM_EVENT](https://developer.android.com/reference/android/provider/CalendarContract#ACTION_HANDLE_CUSTOM_EVENT)intent

<br />

Constant Value: "customAppUri"  

### EXTRA_EVENT_ALL_DAY

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

```
public static final String EXTRA_EVENT_ALL_DAY
```

Intent Extras key: When creating an event, set this to true to create an all-day event by default

<br />

Constant Value: "allDay"  

### EXTRA_EVENT_BEGIN_TIME

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

```
public static final String EXTRA_EVENT_BEGIN_TIME
```

Intent Extras key: The start time of an event or an instance of a recurring event. (milliseconds since epoch)

<br />

Constant Value: "beginTime"  

### EXTRA_EVENT_END_TIME

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

```
public static final String EXTRA_EVENT_END_TIME
```

Intent Extras key: The end time of an event or an instance of a recurring event. (milliseconds since epoch)

<br />

Constant Value: "endTime"  

### EXTRA_EVENT_ID

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

```
public static final String EXTRA_EVENT_ID
```

Intent Extras key: An extra of type`long`holding the id of an event.

<br />

Constant Value: "id"

## Fields

### CONTENT_URI

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

```
public static final Uri CONTENT_URI
```

The content:// style URL for the top-level calendar authority

<br />

## Public methods

### startViewCalendarEventInManagedProfile

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

```
public static boolean startViewCalendarEventInManagedProfile (Context context, 
                long eventId, 
                long startMs, 
                long endMs, 
                boolean allDay, 
                int flags)
```

Starts an activity to view calendar events in the managed profile. When this API is called, the system will attempt to start an activity in the managed profile with an intent targeting the same caller package. The intent will have its action set to[CalendarContract.ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT](https://developer.android.com/reference/android/provider/CalendarContract#ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT)and contain extras corresponding to the API's arguments. A calendar app intending to support cross-profile events viewing should handle this intent, parse the arguments and show the appropriate UI.

<br />

|                                                                                                                    Parameters                                                                                                                     ||
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: the context. This value cannot be`null`. <br />                                                                                                                                                                             |
| `eventId` | `long`: the id of the event to be viewed. Will be put into[EXTRA_EVENT_ID](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_ID)field of the intent. <br />                                        |
| `startMs` | `long`: the start time of the event in milliseconds since epoch. Will be put into[EXTRA_EVENT_BEGIN_TIME](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_BEGIN_TIME)field of the intent. <br /> |
| `endMs`   | `long`: the end time of the event in milliseconds since epoch. Will be put into[EXTRA_EVENT_END_TIME](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_END_TIME)field of the intent. <br />       |
| `allDay`  | `boolean`: if the event is an all-day event. Will be put into[EXTRA_EVENT_ALL_DAY](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_ALL_DAY)field of the intent. <br />                           |
| `flags`   | `int`: flags to be set on the intent via[Intent.setFlags](https://developer.android.com/reference/android/content/Intent#setFlags(int)) <br />                                                                                         |

|                                      Returns                                      ||
|-----------|------------------------------------------------------------------------|
| `boolean` | `true`if the activity is started successfully.`false`otherwise. <br /> |

**See also:**

- [EXTRA_EVENT_ID](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_ID)
- [EXTRA_EVENT_BEGIN_TIME](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_BEGIN_TIME)
- [EXTRA_EVENT_END_TIME](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_END_TIME)
- [EXTRA_EVENT_ALL_DAY](https://developer.android.com/reference/android/provider/CalendarContract#EXTRA_EVENT_ALL_DAY)