public static final class CalendarContract.Calendars
extends Object
implements BaseColumns, CalendarContract.SyncColumns, CalendarContract.CalendarColumns
java.lang.Object | |
↳ | android.provider.CalendarContract.Calendars |
日历表的常量和助手,其中包含各个日历的详细信息。
CALLER_IS_SYNCADAPTER
should be set to true and
ACCOUNT_NAME
and
ACCOUNT_TYPE
must be set in the Uri parameters. See
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
.
_ID
of the calendar should be provided either as an appended id to the Uri (
withAppendedId(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
ACCOUNT_NAME
and
ACCOUNT_TYPE
should not be changed after a calendar is created as this can cause issues for sync adapters.
_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).
_ID
is appended to the Uri.
ACCOUNT_NAME
ACCOUNT_TYPE
CALENDAR_COLOR
_SYNC_ID
DIRTY
MUTATORS
OWNER_ACCOUNT
MAX_REMINDERS
ALLOWED_REMINDERS
ALLOWED_AVAILABILITY
ALLOWED_ATTENDEE_TYPES
CAN_MODIFY_TIME_ZONE
CAN_ORGANIZER_RESPOND
CAN_PARTIALLY_UPDATE
CALENDAR_LOCATION
CALENDAR_TIME_ZONE
CALENDAR_ACCESS_LEVEL
DELETED
CAL_SYNC1
CAL_SYNC2
CAL_SYNC3
CAL_SYNC4
CAL_SYNC5
CAL_SYNC6
CAL_SYNC7
CAL_SYNC8
CAL_SYNC9
CAL_SYNC10
Constants |
|
---|---|
String |
CALENDAR_LOCATION 日历的默认位置。 |
String |
DEFAULT_SORT_ORDER 此表的默认排序顺序 |
String |
NAME 日历的名称。 |
Inherited constants |
---|
From interface android.provider.BaseColumns
|
From interface android.provider.CalendarContract.SyncColumns
|
From interface android.provider.CalendarContract.CalendarColumns
|
From interface android.provider.CalendarContract.CalendarSyncColumns
|
Fields |
|
---|---|
public static final Uri |
CONTENT_URI 内容://用于访问日历的样式网址 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
String CALENDAR_LOCATION
日历的默认位置。 列名称。
类型:TEXT
常量值:“calendar_location”
String DEFAULT_SORT_ORDER
此表的默认排序顺序
常量值:“calendar_displayName”