Stay organized with collections
Save and categorize content based on your preferences.
SearchContext
class SearchContext
Contains information about how to create the search session.
Summary
Public methods |
String |
Returns the name of the database to create or open.
|
Public methods
getDatabaseName
fun getDatabaseName(): String
Returns the name of the database to create or open.
Databases with different names are fully separate with distinct types, namespaces, and data.
Return |
String |
This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 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 2025-02-10 UTC."],[],[],null,["# AppSearchManager.SearchContext\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nSearchContext\n=============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/appsearch/AppSearchManager.SearchContext \"View this page in Java\") \n\n```\nclass SearchContext\n```\n\n|---|-----------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.appsearch.AppSearchManager.SearchContext](#) |\n\nContains information about how to create the search session.\n\nSummary\n-------\n\n| Nested classes ||\n|---|-----------------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/app/appsearch/AppSearchManager.SearchContext.Builder) Builder for [SearchContext](#) objects. |\n\n| Public methods ||\n|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getDatabaseName](#getDatabaseName())`()` Returns the name of the database to create or open. |\n\nPublic methods\n--------------\n\n### getDatabaseName\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getDatabaseName(): String\n```\n\nReturns the name of the database to create or open.\n\nDatabases with different names are fully separate with distinct types, namespaces, and data.\n\n| Return ||\n|----------------------------------------------------------------------------------|------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | This value cannot be `null`. |"]]