CalendarContract.Events Class

Definition

Constants and helpers for the Events table, which contains details for individual events.

[Android.Runtime.Register("android/provider/CalendarContract$Events", DoNotGenerateAcw=true)]
public sealed class CalendarContract.Events : Java.Lang.Object
[<Android.Runtime.Register("android/provider/CalendarContract$Events", DoNotGenerateAcw=true)>]
type CalendarContract.Events = class
    inherit Object
Inheritance
CalendarContract.Events
Attributes

Remarks

Constants and helpers for the Events table, which contains details for individual events. <h3>Operations</h3> 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 should be set to true and #ACCOUNT_NAME and #ACCOUNT_TYPE must be set in the Uri parameters. See Uri.Builder#appendQueryParameter(java.lang.String, java.lang.String) for details on adding parameters. Sync adapters have write access to more columns but are restricted to a single account at a time. <dl> <dt><b>Insert</b></dt> <dd>When inserting a new event the following fields must be included: <ul> <li>dtstart</li> <li>dtend if the event is non-recurring</li> <li>duration if the event is recurring</li> <li>rrule or rdate if the event is recurring</li> <li>eventTimezone</li> <li>a calendar_id</li> </ul> There are also further requirements when inserting or updating an event. See the section on Writing to Events.</dd> <dt><b>Update</b></dt> <dd>To perform an update of an Event the Events#_ID of the event should be provided either as an appended id to the Uri ( ContentUris#withAppendedId) or as the first selection item--the selection should start with "_id=?" and the first selectionArg should be the _id of the event. Updates may also be done using a selection and no id. Updating an event must respect the same rules as inserting and is further restricted in the fields that can be written. See the section on Writing to Events.</dd> <dt><b>Delete</b></dt> <dd>Events can be deleted either by the Events#_ID as an appended id on the Uri or using any standard selection. If an appended id is used a selection is not allowed. There are two versions of delete: as an app and as a sync adapter. An app delete will set the deleted column on an event and remove all instances of that event. A sync adapter delete will remove the event from the database and all associated data.</dd> <dt><b>Query</b></dt> <dd>Querying the Events table will get you all information about a set of events except their reminders, attendees, and extended properties. There will be one row returned for each event that matches the query selection, or at most a single row if the Events#_ID is appended to the Uri. Recurring events will only return a single row regardless of the number of times that event repeats.</dd> </dl> <h3>Writing to Events</h3> There are further restrictions on all Updates and Inserts in the Events table: <ul> <li>If allDay is set to 1 eventTimezone must be "UTC" and the time must correspond to a midnight boundary.</li> <li>Exceptions are not allowed to recur. If rrule or rdate is not empty, original_id and original_sync_id must be empty.</li> <li>In general a calendar_id should not be modified after insertion. This is not explicitly forbidden but many sync adapters will not behave in an expected way if the calendar_id is modified.</li> </ul> The following Events columns are writable by both an app and a sync adapter. <ul> <li>#CALENDAR_ID</li> <li>#ORGANIZER</li> <li>#TITLE</li> <li>#EVENT_LOCATION</li> <li>#DESCRIPTION</li> <li>#EVENT_COLOR</li> <li>#DTSTART</li> <li>#DTEND</li> <li>#EVENT_TIMEZONE</li> <li>#EVENT_END_TIMEZONE</li> <li>#DURATION</li> <li>#ALL_DAY</li> <li>#RRULE</li> <li>#RDATE</li> <li>#EXRULE</li> <li>#EXDATE</li> <li>#ORIGINAL_ID</li> <li>#ORIGINAL_SYNC_ID</li> <li>#ORIGINAL_INSTANCE_TIME</li> <li>#ORIGINAL_ALL_DAY</li> <li>#ACCESS_LEVEL</li> <li>#AVAILABILITY</li> <li>#GUESTS_CAN_MODIFY</li> <li>#GUESTS_CAN_INVITE_OTHERS</li> <li>#GUESTS_CAN_SEE_GUESTS</li> <li>#CUSTOM_APP_PACKAGE</li> <li>#CUSTOM_APP_URI</li> <li>#UID_2445</li> </ul> The following Events columns are writable only by a sync adapter <ul> <li>#DIRTY</li> <li>#MUTATORS</li> <li>#_SYNC_ID</li> <li>#SYNC_DATA1</li> <li>#SYNC_DATA2</li> <li>#SYNC_DATA3</li> <li>#SYNC_DATA4</li> <li>#SYNC_DATA5</li> <li>#SYNC_DATA6</li> <li>#SYNC_DATA7</li> <li>#SYNC_DATA8</li> <li>#SYNC_DATA9</li> <li>#SYNC_DATA10</li> </ul> The remaining columns are either updated by the provider only or are views into other tables and cannot be changed through the Events table.

Java documentation for android.provider.CalendarContract.Events.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
ContentExceptionUri

The content:// style URI for recurring event exceptions.

ContentUri

The content:// style URL for interacting with events.

EnterpriseContentUri

The content:// style URL for querying Events table in the managed profile.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to