Builder to construct instances of AppSearchOptions.
Public Constructor Summary
Builder()
|
Public Method Summary
AppSearchOptions |
build()
Build the configured object.
|
AppSearchOptions.Builder |
setWorkerExecutor(Executor
workerExecutor)
Sets a workerExecutor used to dispatch listener events and callbacks for
ServiceConnection ,
otherwise the main thread is used by default.
|
Inherited Method Summary
Public Constructors
public Builder ()
Public Methods
public AppSearchOptions build ()
Build the configured object.
public AppSearchOptions.Builder setWorkerExecutor (Executor workerExecutor)
Sets a workerExecutor used to dispatch listener events and callbacks for
ServiceConnection
,
otherwise the main thread is used by default. We use the same Executor
for
Task.addOnCompleteListener(Activity, OnCompleteListener)
for all APIs.
NOTE: The Executor
is only effective for Android P (API Level 29) and above. Pre-P devices will deadlock
if they attempt to make blocking AppSearch API calls from the main thread as the same
thread is used by default for connection callbacks.
Returns
- the same Builder instance.