AppFunctionMetadata


public final class AppFunctionMetadata
extends Object implements Parcelable

java.lang.Object
   ↳ android.app.appfunctions.AppFunctionMetadata


Contains an app function's metadata, essential for its invocation and discovery, retrieved using AppFunctionManager.searchAppFunctions.

This metadata is defined in an XML asset file and does not change at runtime. The XML file is referenced from the app's AndroidManifest.xml. How it's referenced depends on whether the app function is implemented using AppFunctionService or AppFunctionManager.registerAppFunction.

The XML schema consists of a root <appfunctions> element that can contain one or more <appfunction> elements. The XML tags used within the <appfunction> element directly correspond to the property names defined by the PROPERTY_* constants in this class. All properties in the XML (including unknown properties) are made available through the getMetadataDocument() method.

Example assets/app_functions.xml declaration:

<appfunctions>
     <appfunction>
         <id>createNote</id>
         <enabledByDefault>true</enabledByDefault>
         <scope>global</scope>
         ...
     </appfunction>
 </appfunctions>
 

See AppFunctionManager.getAppFunctionStates for details on retrieving the runtime state of the app functions.

Summary

Constants

String PROPERTY_ENABLED_BY_DEFAULT

Property name for the XML tag that defines the default value of