AndroidCalendar

class AndroidCalendar(val provider: AndroidCalendarProvider, val values: ContentValues)

Represents a locally stored calendar, containing at.bitfire.ical4android.AndroidEvents (whose data objects are at.bitfire.ical4android.Events). Communicates with the Android Contacts Provider which uses an SQLite database to store the events.

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
Link copied to clipboard

Functions

Link copied to clipboard
fun delete(): Int
Link copied to clipboard
fun eventUri(id: Long): Uri
Link copied to clipboard
fun findEvents(where: String?, whereArgs: Array<String>?): List<AndroidEvent>

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 getEventValues(id: Long, projection: Array<String>? = null, where: String? = null, whereArgs: Array<String>? = null): ContentValues?

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

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

Iterates events from this calendar.

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

Finds the amount of direct instances this event has (without exceptions); used by numInstances to find the number of instances of exceptions.

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

Finds the total number of instances this event has (including instances of exceptions)

Link copied to clipboard
Link copied to clipboard
fun update(values: ContentValues): Int
Link copied to clipboard
fun updateEvent(id: Long, values: ContentValues)

Updates a specific event's main row with the given values.

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

Updates events in this calendar.

Link copied to clipboard