public static final class CalendarContract.Calendars extends Object implements BaseColumns, CalendarContract.SyncColumns, CalendarContract.CalendarColumns
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(android.net.Uri, 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 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.NAME
CalendarContract.CalendarColumns.CALENDAR_DISPLAY_NAME
CalendarContract.CalendarColumns.VISIBLE
CalendarContract.CalendarColumns.SYNC_EVENTS
CalendarContract.SyncColumns.ACCOUNT_NAME
CalendarContract.SyncColumns.ACCOUNT_TYPE
CalendarContract.CalendarColumns.CALENDAR_COLOR
CalendarContract.SyncColumns._SYNC_ID
CalendarContract.SyncColumns.DIRTY
CalendarContract.CalendarColumns.OWNER_ACCOUNT
CalendarContract.CalendarColumns.MAX_REMINDERS
CalendarContract.CalendarColumns.ALLOWED_REMINDERS
CalendarContract.CalendarColumns.ALLOWED_AVAILABILITY
CalendarContract.CalendarColumns.ALLOWED_ATTENDEE_TYPES
CalendarContract.CalendarColumns.CAN_MODIFY_TIME_ZONE
CalendarContract.CalendarColumns.CAN_ORGANIZER_RESPOND
CalendarContract.SyncColumns.CAN_PARTIALLY_UPDATE
CALENDAR_LOCATION
CalendarContract.CalendarColumns.CALENDAR_TIME_ZONE
CalendarContract.CalendarColumns.CALENDAR_ACCESS_LEVEL
CalendarContract.SyncColumns.DELETED
CalendarContract.CalendarSyncColumns.CAL_SYNC1
CalendarContract.CalendarSyncColumns.CAL_SYNC2
CalendarContract.CalendarSyncColumns.CAL_SYNC3
CalendarContract.CalendarSyncColumns.CAL_SYNC4
CalendarContract.CalendarSyncColumns.CAL_SYNC5
CalendarContract.CalendarSyncColumns.CAL_SYNC6
CalendarContract.CalendarSyncColumns.CAL_SYNC7
CalendarContract.CalendarSyncColumns.CAL_SYNC8
CalendarContract.CalendarSyncColumns.CAL_SYNC9
CalendarContract.CalendarSyncColumns.CAL_SYNC10
Modifier and Type | Field and Description |
---|---|
static String |
CALENDAR_LOCATION
The default location for the calendar.
|
static Uri |
CONTENT_URI
The content:// style URL for accessing Calendars
|
static String |
DEFAULT_SORT_ORDER
The default sort order for this table
|
static String |
NAME
The name of the calendar.
|
static String[] |
SYNC_WRITABLE_COLUMNS
These fields are only writable by a sync adapter.
|
_COUNT, _ID
_SYNC_ID, ACCOUNT_NAME, ACCOUNT_TYPE, CAN_PARTIALLY_UPDATE, DELETED, DIRTY
CAL_SYNC1, CAL_SYNC10, CAL_SYNC2, CAL_SYNC3, CAL_SYNC4, CAL_SYNC5, CAL_SYNC6, CAL_SYNC7, CAL_SYNC8, CAL_SYNC9
ALLOWED_ATTENDEE_TYPES, ALLOWED_AVAILABILITY, ALLOWED_REMINDERS, CAL_ACCESS_CONTRIBUTOR, CAL_ACCESS_EDITOR, CAL_ACCESS_FREEBUSY, CAL_ACCESS_NONE, CAL_ACCESS_OVERRIDE, CAL_ACCESS_OWNER, CAL_ACCESS_READ, CAL_ACCESS_RESPOND, CAL_ACCESS_ROOT, CALENDAR_ACCESS_LEVEL, CALENDAR_COLOR, CALENDAR_COLOR_KEY, CALENDAR_DISPLAY_NAME, CALENDAR_TIME_ZONE, CAN_MODIFY_TIME_ZONE, CAN_ORGANIZER_RESPOND, IS_PRIMARY, MAX_REMINDERS, OWNER_ACCOUNT, SYNC_EVENTS, VISIBLE
public static final Uri CONTENT_URI
public static final String DEFAULT_SORT_ORDER
public static final String NAME
Type: TEXT
public static final String CALENDAR_LOCATION
Type: TEXT
public static final String[] SYNC_WRITABLE_COLUMNS
CalendarContract.CALLER_IS_SYNCADAPTER
,
CalendarContract.SyncColumns.ACCOUNT_NAME
, and CalendarContract.SyncColumns.ACCOUNT_TYPE
in the Uri's query
parameters. TODO move to provider