# AppFunctionsChangeEvent.MetadataChanged

Artifact: [androidx.appfunctions:appfunctions](https://developer.android.com/jetpack/androidx/releases/appfunctions) [View Source](https://cs.android.com/search?q=file:androidx/appfunctions/AppFunctionsChangeEvent.kt+class:androidx.appfunctions.AppFunctionsChangeEvent.MetadataChanged) Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

*** ** * ** ***


```
public final class AppFunctionsChangeEvent.MetadataChanged extends AppFunctionsChangeEvent
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.appfunctions.AppFunctionsChangeEvent](https://developer.android.com/reference/androidx/appfunctions/AppFunctionsChangeEvent) ||
|   | ↳ | [androidx.appfunctions.AppFunctionsChangeEvent.MetadataChanged](https://developer.android.com/reference/androidx/appfunctions/AppFunctionsChangeEvent.MetadataChanged) |

*** ** * ** ***

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 `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionPackageMetadata` has been updated.

Upon receiving this notification, clients can call `https://developer.android.com/reference/androidx/appfunctions/AppFunctionManager#searchAppFunctions(androidx.appfunctions.AppFunctionSearchSpec)` with `https://developer.android.com/reference/androidx/appfunctions/AppFunctionSearchSpec#packageNames()` to retrieve the updated `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionMetadata` for affected functions.

Clients should call `https://developer.android.com/reference/androidx/appfunctions/AppFunctionManager#getAppFunctionStates(kotlin.collections.List)` to retrieve the latest `https://developer.android.com/reference/androidx/appfunctions/AppFunctionState` for packages affected by these changes.

**Note:** If packages are reported to have changed but are not returned from `https://developer.android.com/reference/androidx/appfunctions/AppFunctionManager#searchAppFunctions(androidx.appfunctions.AppFunctionSearchSpec)`, it means that the packages have been uninstalled or no longer have functions.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionsChangeEvent.MetadataChanged#MetadataChanged(kotlin.collections.Set)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> changedPackageNames)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionsChangeEvent.MetadataChanged#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionsChangeEvent.MetadataChanged#getChangedPackageNames()()` The set of package names that have changed. |
| `int` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionsChangeEvent.MetadataChanged#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionsChangeEvent.MetadataChanged#toString()()` |

## Public constructors

### MetadataChanged

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

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

## Public methods

### equals

```
public boolean equals(Object other)
```

### getChangedPackageNames

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public final @NonNull Set<@NonNull String> getChangedPackageNames()
```

The set of package names that have changed.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```