The contract between the calendar provider and applications. Contains
definitions for the supported URIs and data columns.
CalendarContract defines the data model of calendar and event related
information. This data is stored in a number of tables:
Nested classes |
class |
CalendarContract.Attendees
Fields and helpers for interacting with Attendees.
|
interface |
CalendarContract.AttendeesColumns
Columns from the Attendees table that other tables join into themselves.
|
class |
CalendarContract.CalendarAlerts
Fields and helpers for accessing calendar alerts information.
|
interface |
CalendarContract.CalendarAlertsColumns
|
class |
CalendarContract.CalendarCache
CalendarCache stores some settings for calendar including the current
time zone for the instances.
|
interface |
CalendarContract.CalendarCacheColumns
|
interface |
CalendarContract.CalendarColumns
Columns specific to the Calendars Uri that other Uris can query.
|
class |
CalendarContract.CalendarEntity
Class that represents a Calendar Entity.
|
interface |
CalendarContract.CalendarSyncColumns
Generic columns for use by sync adapters.
|
class |
CalendarContract.Calendars
Constants and helpers for the Calendars table, which contains details for
individual calendars.
|
class |
CalendarContract.Colors
Fields for accessing colors available for a given account.
|
interface |
CalendarContract.ColorsColumns
|
class |
CalendarContract.EventDays
Fields and helpers for querying for a list of days that contain events.
|
interface |
CalendarContract.EventDaysColumns
|
class |
CalendarContract.Events
Constants and helpers for the Events table, which contains details for
individual events.
|
interface |
CalendarContract.EventsColumns
Columns from the Events table that other tables join into themselves.
|
class |
CalendarContract.EventsEntity
Class that represents an Event Entity.
|
class |
CalendarContract.ExtendedProperties
Fields for accessing the Extended Properties.
|
interface |
CalendarContract.ExtendedPropertiesColumns
|
class |
CalendarContract.Instances
Fields and helpers for interacting with Instances.
|
class |
CalendarContract.Reminders
Fields and helpers for accessing reminders for an event.
|
interface |
CalendarContract.RemindersColumns
|
interface |
CalendarContract.SyncColumns
Columns for Sync information used by Calendars and Events tables.
|
class |
CalendarContract.SyncState
A table provided for sync adapters to use for storing private sync state data.
|
Fields |
public
static
final
Uri |
CONTENT_URI
The content:// style URL for the top-level calendar authority
|
Inherited methods |
From
class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Constants
ACCOUNT_TYPE_LOCAL
String ACCOUNT_TYPE_LOCAL
A special account type for calendars not associated with any account.
Normally calendars that do not match an account on the device will be
removed. Setting the account_type on a calendar to this will prevent it
from being wiped if it does not match an existing account.
Constant Value:
"LOCAL"
ACTION_EVENT_REMINDER
String ACTION_EVENT_REMINDER
Broadcast Action: This is the intent that gets fired when an alarm
notification needs to be posted for a reminder.
Constant Value:
"android.intent.action.EVENT_REMINDER"
ACTION_HANDLE_CUSTOM_EVENT
String ACTION_HANDLE_CUSTOM_EVENT
Activity Action: Display the event to the user in the custom app as
specified in CUSTOM_APP_PACKAGE
. The custom app
will be started via startActivityForResult(Intent, int)
and it should call setResult(int)
with
RESULT_OK
or RESULT_CANCELED
to
acknowledge whether the action was handled or not.
The custom app should have an intent filter like the following:
<intent-filter>
<action android:name="android.provider.calendar.action.HANDLE_CUSTOM_EVENT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/event" />
</intent-filter>
Input: getData()
has the event URI. The extra
EXTRA_EVENT_BEGIN_TIME
has the start time of the instance. The
extra EXTRA_CUSTOM_APP_URI
will have the
CUSTOM_APP_URI
.
Output: RESULT_OK
if this was handled; otherwise
RESULT_CANCELED
.
Constant Value:
"android.provider.calendar.action.HANDLE_CUSTOM_EVENT"
AUTHORITY
String AUTHORITY
This authority is used for writing to or querying from the calendar
provider. Note: This is set at first run and cannot be changed without
breaking apps that access the provider.
Constant Value:
"com.android.calendar"
CALLER_IS_SYNCADAPTER
String CALLER_IS_SYNCADAPTER
An optional insert, update or delete URI parameter that allows the caller
to specify that it is a sync adapter. The default value is false. If set
to true, the modified row is not marked as "dirty" (needs to be synced)
and when the provider calls
notifyChange(android.net.Uri, android.database.ContentObserver, boolean)
, the third parameter "syncToNetwork" is set to false. Furthermore, if
set to true, the caller must also include
ACCOUNT_NAME
and ACCOUNT_TYPE
as
query parameters.
Constant Value:
"caller_is_syncadapter"
EXTRA_EVENT_ALL_DAY
String EXTRA_EVENT_ALL_DAY
Intent Extras key: When creating an event, set this to true to create an
all-day event by default
Constant Value:
"allDay"
EXTRA_EVENT_BEGIN_TIME
String EXTRA_EVENT_BEGIN_TIME
Intent Extras key: The start time of an event or an instance of a
recurring event. (milliseconds since epoch)
Constant Value:
"beginTime"
EXTRA_EVENT_END_TIME
String EXTRA_EVENT_END_TIME
Intent Extras key: The end time of an event or an instance of a recurring
event. (milliseconds since epoch)
Constant Value:
"endTime"
Fields
CONTENT_URI
Uri CONTENT_URI
The content:// style URL for the top-level calendar authority
Interfaces
Classes
Exceptions
This site uses cookies to store your preferences for site-specific language and display options.
This doc is hidden because your selected API level for the
documentation is . You can change the
documentation API level with the selector above the left navigation.
For more information about specifying the API level your app requires,
read Supporting
Different Platform Versions.