Android.App.AppSearch.Observers Namespace

Provides callbacks, change information, and schema filters for observing changes to AppSearch data.

Classes

Name Description
DocumentChangeInfo

Contains information about an individual change detected by an ObserverCallback.

ObserverSpec

Configures the types, namespaces and other properties that ObserverCallback instances match against.

ObserverSpec.Builder

Builder for ObserverSpec instances.

ObserverSpec.InterfaceConsts

Contains constants from the Java interfaces implemented by ObserverSpec.

SchemaChangeInfo

Contains information about a schema change detected by an ObserverCallback.

Interfaces

Name Description
IObserverCallback

An interface which apps can implement to subscribe to notifications of changes to AppSearch data.

Remarks

Implement IObserverCallback to receive document and schema change notifications. DocumentChangeInfo identifies changed documents, and SchemaChangeInfo identifies changed schema types.

Use ObserverSpec.Builder to select schema types for an observer. An empty schema filter matches all schema types. Document changes caused by schema migration are reported as schema changes, not as individual document changes.

Android observer callback reference , document change reference, and observer specification reference.