Added in API level 33

ObserverCallback


public interface ObserverCallback

android.app.appsearch.observer.ObserverCallback


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

Summary

Public methods

abstract void onDocumentChanged(DocumentChangeInfo changeInfo)

Callback to trigger after document changes (documents added, updated or removed).

abstract void onSchemaChanged(SchemaChangeInfo changeInfo)

Callback to trigger after schema changes (schema type added, updated or removed).

Public methods

onDocumentChanged

Added in API level 33
public abstract void onDocumentChanged (DocumentChangeInfo changeInfo)

Callback to trigger after document changes (documents added, updated or removed).

Parameters
changeInfo DocumentChangeInfo: Information about the nature of the change. This value cannot be null.

onSchemaChanged

Added in API level 33
public abstract void onSchemaChanged (SchemaChangeInfo changeInfo)

Callback to trigger after schema changes (schema type added, updated or removed).

Parameters
changeInfo SchemaChangeInfo: Information about the nature of the change. This value cannot be null.