ObserveAppFunctionsEvent.MetadataChanged


public final class ObserveAppFunctionsEvent.MetadataChanged extends ObserveAppFunctionsEvent


Triggered when changes occur to a package exposing app functions that may impact the state or metadata of its contained functions.

This includes changes such as:

  • The definition of a function metadata exposed by the package has changed (e.g, the parameters of the function have changed).

  • All functions within the package are added or removed due to the package being installed or uninstalled.

  • The package's androidx.appfunctions.metadata.AppFunctionPackageMetadata has been updated.

Upon receiving this notification, clients can call AppFunctionManager.searchAppFunctions with AppFunctionSearchSpec.packageNames to retrieve the updated androidx.appfunctions.metadata.AppFunctionMetadata for affected functions.

Clients should call AppFunctionManager.getAppFunctionStates to retrieve the latest AppFunctionState for packages affected by these changes.

Note: If packages are reported to have changed but are not returned from AppFunctionManager.searchAppFunctions, it means that the packages have been uninstalled or no longer have functions.

Summary

Public constructors

MetadataChanged(@NonNull Set<@NonNull String> changedPackageNames)

Public methods

boolean
equals(Object other)
final @NonNull Set<@NonNull String>

The set of package names that have changed.

int
@NonNull String

Public constructors

MetadataChanged

Added in 1.0.0-alpha12
public MetadataChanged(@NonNull Set<@NonNull String> changedPackageNames)

Public methods

equals

public boolean equals(Object other)

getChangedPackageNames

Added in 1.0.0-alpha12
public final @NonNull Set<@NonNull String> getChangedPackageNames()

The set of package names that have changed.

hashCode

public int hashCode()

toString

public @NonNull String toString()