AndroidCalendar

Represents a locally stored calendar, containing AndroidEvent2 objects. Communicates with the Android Contacts Provider which uses an SQLite database to store the events.

Methods that use ContentValues operate directly on rows of the Events table. Methods that use Entity operate on EventsEntity URIs to access the Events rows together with associated data rows (reminders, attendees etc.)

Parameters

client

calendar provider

values

content values as read from the calendar provider; android.provider.BaseColumns._ID must be set

Throws

Constructors

Link copied to clipboard
constructor(provider: AndroidCalendarProvider, values: ContentValues)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun addEvent(entity: Entity): Long

Inserts an event to the calendar provider.

Link copied to clipboard
fun delete(): Int
Link copied to clipboard
fun deleteEvent(id: Long)

Deletes an event row.

Link copied to clipboard
Link copied to clipboard
fun eventUri(id: Long): Uri
Link copied to clipboard
fun findEvent(where: String?, whereArgs: Array<String>?, sortOrder: String? = null): AndroidEvent2?

Gets the first event from this calendar that matches the given query.

Link copied to clipboard
fun findEventEntities(where: String?, whereArgs: Array<String>?): List<Entity>

Queries events from this calendar.

Link copied to clipboard
fun findEventRow(projection: Array<String>?, where: String?, whereArgs: Array<String>?): ContentValues?

Gets the first event row that matches the given query.

Link copied to clipboard
fun findEvents(where: String?, whereArgs: Array<String>?): <Error class: unknown class>

Queries events from this calendar.

Link copied to clipboard

Gets a specific event, identified by its ID, from this calendar.

Link copied to clipboard
fun getEventEntity(id: Long, where: String? = null, whereArgs: Array<String>? = null): Entity?
Link copied to clipboard
fun getEventRow(id: Long, projection: Array<String>? = null, where: String? = null, whereArgs: Array<String>? = null): ContentValues?

Gets the event row of a specific event, identified by its ID, from this calendar.

Link copied to clipboard
fun iterateEventRows(projection: Array<String>?, where: String?, whereArgs: Array<String>?, body: (ContentValues) -> Unit)

Iterates event rows from this calendar.

Link copied to clipboard
fun iterateEvents(where: String?, whereArgs: Array<String>?, body: (Entity) -> Unit)

Iterates event entities from this calendar.

Link copied to clipboard
fun numDirectInstances(eventId: Long): Int?

Finds the amount of instances this event has. Exceptions generate their own instances and are not taken into account by this method.

Link copied to clipboard
fun numInstances(eventId: Long): Int?
Link copied to clipboard
Link copied to clipboard
fun update(values: ContentValues): Int
Link copied to clipboard
fun updateEvent(id: Long, entity: Entity): Long
Link copied to clipboard

Updates a specific event's main row with the given values. Doesn't influence data rows.

Link copied to clipboard
fun updateEventRows(values: ContentValues, where: String?, whereArgs: Array<String>?): Int

Updates event rows in this calendar.

Link copied to clipboard