AppSearchAccount


class AppSearchAccount : GenericDocument
kotlin.Any
   ↳ android.app.appsearch.GenericDocument
   ↳ android.app.appsearch.AppSearchAccount

Encapsulates a GenericDocument representing an android.accounts.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

The builder class for AppSearchAccount.

Constants
static String

The name of the schema type for AppSearchAccount documents.

Public constructors

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

Public methods
String?

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

String?

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

String?

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

Inherited functions
Properties
static AppSearchSchema!

Constants

SCHEMA_TYPE

static val SCHEMA_TYPE: String

The name of the schema type for AppSearchAccount documents.

Value: "builtin:Account"

Public constructors

AppSearchAccount

AppSearchAccount(document: GenericDocument)

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

Parameters
document GenericDocument: The GenericDocument containing the Account content.
This value cannot be null.

Public methods

getAccountId

fun getAccountId(): String?

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

getAccountName

fun getAccountName(): String?

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

getAccountType

fun getAccountType(): String?

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

Properties

SCHEMA

static val SCHEMA: AppSearchSchema!