CalendarContract.Instances.Query Method

Definition

Overloads

Query(ContentResolver, String[], Int64, Int64)

Performs a query to return all visible instances in the given range.

Query(ContentResolver, String[], Int64, Int64, String)

Performs a query to return all visible instances in the given range that match the given query.

Query(ContentResolver, String[], Int64, Int64)

Performs a query to return all visible instances in the given range.

[Android.Runtime.Register("query", "(Landroid/content/ContentResolver;[Ljava/lang/String;JJ)Landroid/database/Cursor;", "")]
public static Android.Database.ICursor? Query (Android.Content.ContentResolver? cr, string[]? projection, long begin, long end);
[<Android.Runtime.Register("query", "(Landroid/content/ContentResolver;[Ljava/lang/String;JJ)Landroid/database/Cursor;", "")>]
static member Query : Android.Content.ContentResolver * string[] * int64 * int64 -> Android.Database.ICursor

Parameters

cr
ContentResolver

The ContentResolver to use for the query

projection
String[]

The columns to return

begin
Int64

The start of the time range to query in UTC millis since epoch

end
Int64

The end of the time range to query in UTC millis since epoch

Returns

A Cursor containing all instances in the given range

Attributes

Remarks

Performs a query to return all visible instances in the given range. This is a blocking function and should not be done on the UI thread. This will cause an expansion of recurring events to fill this time range if they are not already expanded and will slow down for larger time ranges with many recurring events.

Java documentation for android.provider.CalendarContract.Instances.query(android.content.ContentResolver, java.lang.String[], long, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Query(ContentResolver, String[], Int64, Int64, String)

Performs a query to return all visible instances in the given range that match the given query.

[Android.Runtime.Register("query", "(Landroid/content/ContentResolver;[Ljava/lang/String;JJLjava/lang/String;)Landroid/database/Cursor;", "")]
public static Android.Database.ICursor? Query (Android.Content.ContentResolver? cr, string[]? projection, long begin, long end, string? searchQuery);
[<Android.Runtime.Register("query", "(Landroid/content/ContentResolver;[Ljava/lang/String;JJLjava/lang/String;)Landroid/database/Cursor;", "")>]
static member Query : Android.Content.ContentResolver * string[] * int64 * int64 * string -> Android.Database.ICursor

Parameters

cr
ContentResolver

The ContentResolver to use for the query

projection
String[]

The columns to return

begin
Int64

The start of the time range to query in UTC millis since epoch

end
Int64

The end of the time range to query in UTC millis since epoch

searchQuery
String

A string of space separated search terms. Segments enclosed by double quotes will be treated as a single term.

Returns

A Cursor of instances matching the search terms in the given time range

Attributes

Remarks

Performs a query to return all visible instances in the given range that match the given query. This is a blocking function and should not be done on the UI thread. This will cause an expansion of recurring events to fill this time range if they are not already expanded and will slow down for larger time ranges with many recurring events.

Java documentation for android.provider.CalendarContract.Instances.query(android.content.ContentResolver, java.lang.String[], long, long, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to