Share via


AsyncQueryHandler.StartQuery Method

Definition

This method begins an asynchronous query.

[Android.Runtime.Register("startQuery", "(ILjava/lang/Object;Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V", "GetStartQuery_ILjava_lang_Object_Landroid_net_Uri_arrayLjava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Ljava_lang_String_Handler")]
public virtual void StartQuery (int token, Java.Lang.Object? cookie, Android.Net.Uri? uri, string[]? projection, string? selection, string[]? selectionArgs, string? orderBy);
[<Android.Runtime.Register("startQuery", "(ILjava/lang/Object;Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V", "GetStartQuery_ILjava_lang_Object_Landroid_net_Uri_arrayLjava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Ljava_lang_String_Handler")>]
abstract member StartQuery : int * Java.Lang.Object * Android.Net.Uri * string[] * string * string[] * string -> unit
override this.StartQuery : int * Java.Lang.Object * Android.Net.Uri * string[] * string * string[] * string -> unit

Parameters

token
Int32

A token passed into #onQueryComplete to identify the query.

cookie
Object

An object that gets passed into #onQueryComplete

uri
Uri

The URI, using the content:// scheme, for the content to retrieve.

projection
String[]

A list of which columns to return. Passing null will return all columns, which is discouraged to prevent reading data from storage that isn't going to be used.

selection
String

A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will return all rows for the given URI.

selectionArgs
String[]

You may include ?s in selection, which will be replaced by the values from selectionArgs, in the order that they appear in the selection. The values will be bound as Strings.

orderBy
String

How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered.

Attributes

Remarks

This method begins an asynchronous query. When the query is done #onQueryComplete is called.

Java documentation for android.content.AsyncQueryHandler.startQuery(int, java.lang.Object, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], 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