Language

EnterpriseGlobalSearchSession.GetSchema Method

Definition

Retrieves the collection of schemas most recently successfully provided to AppSearchSession.setSchema for any types belonging to the requested package and database that the caller has been granted access to.

[Android.Runtime.Register("getSchema", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetGetSchema_Ljava_lang_String_Ljava_lang_String_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=35)]
public virtual void GetSchema(string packageName, string databaseName, Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("getSchema", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetGetSchema_Ljava_lang_String_Ljava_lang_String_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=35)>]
abstract member GetSchema : string * string * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.GetSchema : string * string * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

Parameters

packageName
String

the package that owns the requested AppSearchSchema instances. This value cannot be null.

databaseName
String

the database that owns the requested AppSearchSchema instances. This value cannot be null.

executor
IExecutor

Executor on which to invoke the callback. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

callback
IConsumer

Callback that receives an AppSearchResult containing a GetSchemaResponse on success. The response is empty if the requested package and database do not exist, have not set a schema, or contain no schemas accessible to the caller. This value cannot be null.

Attributes

Remarks

Retrieves the collection of schemas most recently successfully provided to AppSearchSession.setSchema for any types belonging to the requested package and database that the caller has been granted access to. If the requested package/database combination does not exist or the caller has not been granted access to it, the callback receives an AppSearchResult containing an empty GetSchemaResponse.

Android reference for android.app.appsearch.EnterpriseGlobalSearchSession.getSchema.

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