# Print output for @column tags ?>
public
static
final
class
CalendarContract.Calendars
extends Object
implements
BaseColumns,
CalendarContract.SyncColumns,
CalendarContract.CalendarColumns
| java.lang.Object | |
| ↳ | android.provider.CalendarContract.Calendars |
Constants and helpers for the Calendars table, which contains details for individual calendars.
CalendarContract.CALLER_IS_SYNCADAPTER should be set to true and
CalendarContract.SyncColumns.ACCOUNT_NAME and CalendarContract.SyncColumns.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 CalendarContract.SyncColumns.ACCOUNT_TYPE of
CalendarContract.ACCOUNT_TYPE_LOCAL .
BaseColumns._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 CalendarContract.SyncColumns.ACCOUNT_NAME and
CalendarContract.SyncColumns.ACCOUNT_TYPE should not be changed after a calendar is created
as this can cause issues for sync adapters.
BaseColumns._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).BaseColumns._ID
is appended to the Uri.NAMECalendarContract.CalendarColumns.CALENDAR_DISPLAY_NAMECalendarContract.CalendarColumns.VISIBLECalendarContract.CalendarColumns.SYNC_EVENTSCalendarContract.SyncColumns.ACCOUNT_NAMECalendarContract.SyncColumns.ACCOUNT_TYPECalendarContract.CalendarColumns.CALENDAR_COLORCalendarContract.SyncColumns._SYNC_IDCalendarContract.SyncColumns.DIRTYCalendarContract.SyncColumns.MUTATORSCalendarContract.CalendarColumns.OWNER_ACCOUNTCalendarContract.CalendarColumns.MAX_REMINDERSCalendarContract.CalendarColumns.ALLOWED_REMINDERSCalendarContract.CalendarColumns.ALLOWED_AVAILABILITYCalendarContract.CalendarColumns.ALLOWED_ATTENDEE_TYPESCalendarContract.CalendarColumns.CAN_MODIFY_TIME_ZONECalendarContract.CalendarColumns.CAN_ORGANIZER_RESPONDCalendarContract.SyncColumns.CAN_PARTIALLY_UPDATECALENDAR_LOCATIONCalendarContract.CalendarColumns.CALENDAR_TIME_ZONECalendarContract.CalendarColumns.CALENDAR_ACCESS_LEVELCalendarContract.SyncColumns.DELETEDCalendarContract.CalendarSyncColumns.CAL_SYNC1CalendarContract.CalendarSyncColumns.CAL_SYNC2CalendarContract.CalendarSyncColumns.CAL_SYNC3CalendarContract.CalendarSyncColumns.CAL_SYNC4CalendarContract.CalendarSyncColumns.CAL_SYNC5CalendarContract.CalendarSyncColumns.CAL_SYNC6CalendarContract.CalendarSyncColumns.CAL_SYNC7CalendarContract.CalendarSyncColumns.CAL_SYNC8CalendarContract.CalendarSyncColumns.CAL_SYNC9CalendarContract.CalendarSyncColumns.CAL_SYNC10Constants | |
|---|---|
String |
CALENDAR_LOCATION
The default location for the calendar. |
String |
DEFAULT_SORT_ORDER
The default sort order for this table |
String |
NAME
The name of the calendar. |
Inherited constants |
|---|
Fields | |
|---|---|
public
static
final
Uri |
CONTENT_URI
The content:// style URL for accessing Calendars |
public
static
final
Uri |
ENTERPRISE_CONTENT_URI
The content:// style URL for querying Calendars table in the managed profile. |
Inherited methods | |
|---|---|
public static final String CALENDAR_LOCATION
The default location for the calendar. Column name.
Type: TEXT
Constant Value: "calendar_location"
public static final String DEFAULT_SORT_ORDER
The default sort order for this table
Constant Value: "calendar_displayName"
public static final String NAME
The name of the calendar. Column name.
Type: TEXT
Constant Value: "name"
public static final Uri ENTERPRISE_CONTENT_URI
The content:// style URL for querying Calendars table in the managed profile. Appending
a calendar id using ContentUris#withAppendedId(Uri, long) specifies
a single calendar.
The following columns are allowed to be queried via this uri:
BaseColumns._IDCalendarContract.CalendarColumns.CALENDAR_COLORCalendarContract.CalendarColumns.VISIBLECALENDAR_LOCATIONCalendarContract.CalendarColumns.CALENDAR_TIME_ZONECalendarContract.CalendarColumns.IS_PRIMARYIllegalArgumentException 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).
Apps can register a ContentObserver for this URI to listen
to changes.