PlayServicesStorage.SearchContext.Builder


public final class PlayServicesStorage.SearchContext.Builder


Builder for SearchContext objects.

Summary

Public constructors

Builder(@NonNull Context context, @NonNull String databaseName)

Creates a SearchContext.Builder instance.

Public methods

@NonNull PlayServicesStorage.SearchContext

Builds a SearchContext instance.

Public constructors

Builder

Added in 1.1.0-alpha04
public Builder(@NonNull Context context, @NonNull String databaseName)

Creates a SearchContext.Builder instance.

AppSearchSession will create or open a database under the given name.

Databases with different names are fully separate with distinct schema types, namespaces, and documents.

The database name cannot contain '/'.

The database name will be visible to all system UI or third-party applications that have been granted access to any of the database's documents (for example, using setSchemaTypeVisibilityForPackage).

Parameters
@NonNull String databaseName

The name of the database.

Throws
java.lang.IllegalArgumentException

if the databaseName contains '/'.

Public methods

build

Added in 1.1.0-alpha04
public @NonNull PlayServicesStorage.SearchContext build()

Builds a SearchContext instance.