AppFunctionManager.SearchAppFunctions Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Searches app function AppFunctionMetadatas.
[Android.Runtime.Register("searchAppFunctions", "(Landroid/app/appfunctions/AppFunctionSearchSpec;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)]
public void SearchAppFunctions(Android.App.AppFunctions.AppFunctionSearchSpec searchSpec, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("searchAppFunctions", "(Landroid/app/appfunctions/AppFunctionSearchSpec;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)>]
member this.SearchAppFunctions : Android.App.AppFunctions.AppFunctionSearchSpec * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
Parameters
- searchSpec
- AppFunctionSearchSpec
The spec of app functions to search for. This value cannot be null.
- executor
- IExecutor
The executor to run the callback. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.
- callback
- IOutcomeReceiver
The callback to receive the search results. This value cannot be null.
- Attributes
Remarks
Searches app function AppFunctionMetadatas.
Note that the state is not guaranteed to be the latest, as metadata can change between request and execute times when apps are updated.
The calling app can search for: Functions in its own package (no permission required); Functions in other packages that it is allowed to query via PackageManager.canPackageQuery(String, String) when holding the Manifest.permission.EXECUTE_APP_FUNCTIONS permission; Functions in other packages that it is allowed to query via PackageManager.canPackageQuery(String, String) when holding either the android.permission.EXECUTE_APP_FUNCTIONS_SYSTEM or android.permission.DISCOVER_APP_FUNCTIONS permission on API level 37 and above.
See getAppFunctionStates(List, Executor, OutcomeReceiver) and getAppFunctionActivityStates(Set, Executor, OutcomeReceiver) on how to retrieve the runtime state of app functions.
See observeAppFunctions(Executor, AppFunctionObserver) for observing changes to app functions' AppFunctionMetadata and AppFunctionStates.
Android reference for android.app.appfunctions.AppFunctionManager.searchAppFunctions.
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.