共用方式為


AppSearchManager.CreateEnterpriseGlobalSearchSession Method

Definition

Creates a new EnterpriseGlobalSearchSession

[Android.Runtime.Register("createEnterpriseGlobalSearchSession", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetCreateEnterpriseGlobalSearchSession_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=35)]
public virtual void CreateEnterpriseGlobalSearchSession (Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("createEnterpriseGlobalSearchSession", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetCreateEnterpriseGlobalSearchSession_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=35)>]
abstract member CreateEnterpriseGlobalSearchSession : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.CreateEnterpriseGlobalSearchSession : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

Parameters

executor
IExecutor

Executor on which to invoke the callback.

callback
IConsumer

The AppSearchResult&lt;EnterpriseGlobalSearchSession&gt; of performing this operation. Or a AppSearchResult with failure reason code and error information.

Attributes

Remarks

Creates a new EnterpriseGlobalSearchSession

EnterpriseGlobalSearchSession queries data from the user’s work profile, allowing apps running on the personal profile to access a limited subset of work profile data. Enterprise access must be explicitly enabled on schemas, and schemas may also specify additional permissions required for enterprise access.

This process requires an AppSearch native indexing file system. If it's not created, the initialization process will create one under the user's credential encrypted directory.

Java documentation for android.app.appsearch.AppSearchManager.createEnterpriseGlobalSearchSession(java.util.concurrent.Executor, java.util.function.Consumer<android.app.appsearch.AppSearchResult<android.app.appsearch.EnterpriseGlobalSearchSession>>).

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