Język

IAppFunctionObserver.OnAppFunctionMetadataChanged Method

Definition

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

[Android.Runtime.Register("onAppFunctionMetadataChanged", "(Ljava/util/Set;)V", "GetOnAppFunctionMetadataChanged_Ljava_util_Set_Handler:Android.App.AppFunctions.IAppFunctionObserverInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)]
public void OnAppFunctionMetadataChanged(System.Collections.Generic.ICollection<string> changedPackageNames);
[<Android.Runtime.Register("onAppFunctionMetadataChanged", "(Ljava/util/Set;)V", "GetOnAppFunctionMetadataChanged_Ljava_util_Set_Handler:Android.App.AppFunctions.IAppFunctionObserverInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)>]
abstract member OnAppFunctionMetadataChanged : System.Collections.Generic.ICollection<string> -> unit

Parameters

changedPackageNames
ICollection<String>

The names of the updated packages.

Attributes

Remarks

Called 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 AppFunctionPackageMetadata has been updated.

Upon receiving this notification, clients can call AppFunctionManager.searchAppFunctions with AppFunctionSearchSpec.Builder.setPackageNames to retrieve the updated 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.

Android reference for android.app.appfunctions.AppFunctionObserver.onAppFunctionMetadataChanged.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to