AppSearch
Stay organized with collections
Save and categorize content based on your preferences.
The main entry point for AppSearch services.
Inherited Method Summary
From class java.lang.Object
Public Methods
Creates a new instance of AppSearchClient
for use in a non-activity context.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eAppSearch\u003c/code\u003e is the primary entry point for utilizing AppSearch services on Android.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods for creating instances of \u003ccode\u003eAppSearchClient\u003c/code\u003e and \u003ccode\u003eGlobalSearchClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAppSearchClient\u003c/code\u003e allows interaction with app-specific search data.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGlobalSearchClient\u003c/code\u003e enables interaction with platform-wide search functionality.\u003c/p\u003e\n"],["\u003cp\u003eClients can be created for use in both activity and non-activity contexts.\u003c/p\u003e\n"]]],["AppSearch serves as the main entry point for AppSearch services. It provides static methods to create instances of `AppSearchClient` and `GlobalSearchClient`. `createAppSearchClient` generates an `AppSearchClient` instance, either for an Activity or a non-Activity context, using `AppSearchOptions`. Similarly, `createGlobalSearchClient` creates a `GlobalSearchClient` instance, also supporting both Activity and non-Activity contexts, with specified `AppSearchOptions`. These methods return a Task that yields the respective client.\n"],null,["# AppSearch\n\npublic final class **AppSearch** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nThe main entry point for AppSearch services. \n\n### Public Method Summary\n\n|-------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static Task\\\u003c[AppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearchClient)\\\u003e | [createAppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearch#createAppSearchClient(android.content.Context,%20com.google.android.gms.appsearch.AppSearchOptions))([Context](//developer.android.com/reference/android/content/Context.html) context, [AppSearchOptions](/android/reference/com/google/android/gms/appsearch/AppSearchOptions) options) Creates a new instance of [AppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearchClient) for use in a non-activity context. |\n| static Task\\\u003c[AppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearchClient)\\\u003e | [createAppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearch#createAppSearchClient(android.app.Activity,%20com.google.android.gms.appsearch.AppSearchOptions))([Activity](//developer.android.com/reference/android/app/Activity.html) activity, [AppSearchOptions](/android/reference/com/google/android/gms/appsearch/AppSearchOptions) options) Creates a new instance of [AppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearchClient) for use in an activity. |\n| static Task\\\u003c[GlobalSearchClient](/android/reference/com/google/android/gms/appsearch/GlobalSearchClient)\\\u003e | [createGlobalSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearch#createGlobalSearchClient(android.app.Activity,%20com.google.android.gms.appsearch.AppSearchOptions))([Activity](//developer.android.com/reference/android/app/Activity.html) activity, [AppSearchOptions](/android/reference/com/google/android/gms/appsearch/AppSearchOptions) options) Creates a new instance of [GlobalSearchClient](/android/reference/com/google/android/gms/appsearch/GlobalSearchClient) for use in an activity. |\n| static Task\\\u003c[GlobalSearchClient](/android/reference/com/google/android/gms/appsearch/GlobalSearchClient)\\\u003e | [createGlobalSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearch#createGlobalSearchClient(android.content.Context,%20com.google.android.gms.appsearch.AppSearchOptions))([Context](//developer.android.com/reference/android/content/Context.html) context, [AppSearchOptions](/android/reference/com/google/android/gms/appsearch/AppSearchOptions) options) Creates a new instance of [GlobalSearchClient](/android/reference/com/google/android/gms/appsearch/GlobalSearchClient) for use in a non-activity context. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public static Task\\\u003c[AppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearchClient)\\\u003e\n**createAppSearchClient** ([Context](//developer.android.com/reference/android/content/Context.html) context, [AppSearchOptions](/android/reference/com/google/android/gms/appsearch/AppSearchOptions) options)\n\nCreates a new instance of [AppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearchClient)\nfor use in a non-activity context. \n\n#### public static Task\\\u003c[AppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearchClient)\\\u003e\n**createAppSearchClient** ([Activity](//developer.android.com/reference/android/app/Activity.html) activity, [AppSearchOptions](/android/reference/com/google/android/gms/appsearch/AppSearchOptions) options)\n\nCreates a new instance of [AppSearchClient](/android/reference/com/google/android/gms/appsearch/AppSearchClient)\nfor use in an activity. \n\n#### public static Task\\\u003c[GlobalSearchClient](/android/reference/com/google/android/gms/appsearch/GlobalSearchClient)\\\u003e\n**createGlobalSearchClient** ([Activity](//developer.android.com/reference/android/app/Activity.html) activity, [AppSearchOptions](/android/reference/com/google/android/gms/appsearch/AppSearchOptions) options)\n\nCreates a new instance of [GlobalSearchClient](/android/reference/com/google/android/gms/appsearch/GlobalSearchClient)\nfor use in an activity. \n\n#### public static Task\\\u003c[GlobalSearchClient](/android/reference/com/google/android/gms/appsearch/GlobalSearchClient)\\\u003e\n**createGlobalSearchClient** ([Context](//developer.android.com/reference/android/content/Context.html) context, [AppSearchOptions](/android/reference/com/google/android/gms/appsearch/AppSearchOptions) options)\n\nCreates a new instance of [GlobalSearchClient](/android/reference/com/google/android/gms/appsearch/GlobalSearchClient)\nfor use in a non-activity context."]]