AppSearchAccount


public final class AppSearchAccount
extends GenericDocument

java.lang.Object
   ↳ android.app.appsearch.GenericDocument
     ↳ android.app.appsearch.AppSearchAccount


Encapsulates a GenericDocument representing an Account.

In AppSearch, an Account is used to partition data and manage its lifecycle. By associating indexed documents with an AppSearchAccount, the system can perform automated wipeout documents when an account is removed from the device.

This class provides a standardized way for AppSearch to recognize which data belongs to which user identity in multi-login or synced environments.

This class is a higher level implement of GenericDocument.

Summary

Nested classes

class AppSearchAccount.Builder

The builder class for AppSearchAccount

Constants

String SCHEMA_TYPE

The name of the schema type for AppSearchAccount documents.

Fields

public static final AppSearchSchema SCHEMA

Public constructors

AppSearchAccount(GenericDocument document)

Creates a new AppSearchAccount from the contents of an existing GenericDocument.

Public methods

String getAccountId()

Gets the account id of AppSearchAccount or null if it's not been set yet.

String getAccountName()

Gets the name of AppSearchAccount or null if it's not been set yet.

String getAccountType()

Gets the type of AppSearchAccount or null if it's not been set yet.

Inherited methods