次の方法で共有


CalendarContract.Calendars Class

Definition

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

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

Remarks

Constants and helpers for the Calendars table, which contains details for individual calendars. <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. 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 of #ACCOUNT_TYPE_LOCAL . <dl> <dt><b>Insert</b></dt> <dd>When inserting a new calendar the following fields must be included: <ul> <li>#ACCOUNT_NAME</li> <li>#ACCOUNT_TYPE</li> <li>#NAME</li> <li>#CALENDAR_DISPLAY_NAME</li> <li>#CALENDAR_COLOR</li> <li>#CALENDAR_ACCESS_LEVEL</li> <li>#OWNER_ACCOUNT</li> </ul> The following fields are not required when inserting a Calendar but are generally a good idea to include: <ul> <li>#SYNC_EVENTS set to 1</li> <li>#CALENDAR_TIME_ZONE</li> <li>#ALLOWED_REMINDERS</li> <li>#ALLOWED_AVAILABILITY</li> <li>#ALLOWED_ATTENDEE_TYPES</li> </ul> <dt><b>Update</b></dt> <dd>To perform an update on a calendar the #_ID of the calendar 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 calendar. Calendars may also be updated using a selection without the id. In general, the #ACCOUNT_NAME and #ACCOUNT_TYPE should not be changed after a calendar is created as this can cause issues for sync adapters. <dt><b>Delete</b></dt> <dd>Calendars can be deleted either by the #_ID 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).</dd> <dt><b>Query</b></dt> <dd>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 is appended to the Uri.</dd> </dl> <h3>Calendar Columns</h3> The following Calendar columns are writable by both an app and a sync adapter. <ul> <li>#NAME</li> <li>#CALENDAR_DISPLAY_NAME</li> <li>#VISIBLE</li> <li>#SYNC_EVENTS</li> </ul> The following Calendars columns are writable only by a sync adapter <ul> <li>#ACCOUNT_NAME</li> <li>#ACCOUNT_TYPE</li> <li>#CALENDAR_COLOR</li> <li>#_SYNC_ID</li> <li>#DIRTY</li> <li>#MUTATORS</li> <li>#OWNER_ACCOUNT</li> <li>#MAX_REMINDERS</li> <li>#ALLOWED_REMINDERS</li> <li>#ALLOWED_AVAILABILITY</li> <li>#ALLOWED_ATTENDEE_TYPES</li> <li>#CAN_MODIFY_TIME_ZONE</li> <li>#CAN_ORGANIZER_RESPOND</li> <li>#CAN_PARTIALLY_UPDATE</li> <li>#CALENDAR_LOCATION</li> <li>#CALENDAR_TIME_ZONE</li> <li>#CALENDAR_ACCESS_LEVEL</li> <li>#DELETED</li> <li>#CAL_SYNC1</li> <li>#CAL_SYNC2</li> <li>#CAL_SYNC3</li> <li>#CAL_SYNC4</li> <li>#CAL_SYNC5</li> <li>#CAL_SYNC6</li> <li>#CAL_SYNC7</li> <li>#CAL_SYNC8</li> <li>#CAL_SYNC9</li> <li>#CAL_SYNC10</li> </ul>

Java documentation for android.provider.CalendarContract.Calendars.

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.

Fields

CalendarLocation

The default location for the calendar.

DefaultSortOrder

The default sort order for this table

Name

The name of the calendar.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
ContentUri

The content:// style URL for accessing Calendars

EnterpriseContentUri

The content:// style URL for querying Calendars 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, 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)
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)

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