Stay organized with collections
Save and categorize content based on your preferences.
ObserverSpec
class ObserverSpec : Parcelable
Configures the types, namespaces and other properties that ObserverCallback
instances match against.
Summary
Inherited constants |
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents() : indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel : the object being written is a return value, that is the result of a function such as "Parcelable someFunction() ", "void someFunction(out Parcelable) ", or "void someFunction(inout Parcelable) ". Some implementations may want to release resources at this point.
|
|
Public methods |
MutableSet<String!> |
Returns the list of schema types which observers using this spec will trigger on.
|
Unit |
Flatten this object in to a Parcel.
|
Public methods
getFilterSchemas
fun getFilterSchemas(): MutableSet<String!>
Returns the list of schema types which observers using this spec will trigger on.
If empty, the observers will trigger on all schema types.
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Properties
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-13 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-13 UTC."],[],[],null,["# ObserverSpec\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 3](https://developer.android.com/sdkExtensions)\n\nObserverSpec\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/appsearch/observer/ObserverSpec \"View this page in Java\") \n\n```\nclass ObserverSpec : Parcelable\n```\n\n|---|--------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.appsearch.observer.ObserverSpec](#) |\n\nConfigures the types, namespaces and other properties that [ObserverCallback](/reference/kotlin/android/app/appsearch/observer/ObserverCallback) instances match against.\n\nSummary\n-------\n\n| Nested classes ||\n|---|---------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/app/appsearch/observer/ObserverSpec.Builder) Builder for [ObserverSpec](#) instances. |\n\n| Inherited constants ||\n|---|---|\n| From class [Parcelable](../../../os/Parcelable.html#) |----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONTENTS_FILE_DESCRIPTOR](../../../os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) Descriptor bit used with [describeContents()](../../../os/Parcelable.html#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PARCELABLE_WRITE_RETURN_VALUE](../../../os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int) Flag for use with [writeToParcel](../../../os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)): the object being written is a return value, that is the result of a function such as \"`Parcelable someFunction()`\", \"`void someFunction(out Parcelable)`\", or \"`void someFunction(inout Parcelable)`\". Some implementations may want to release resources at this point. \u003cbr /\u003e | ||\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\\\u003e | [getFilterSchemas](#getFilterSchemas())`()` Returns the list of schema types which observers using this spec will trigger on. |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [writeToParcel](#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`dest:` `[Parcel](../../../os/Parcel.html#)`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Flatten this object in to a Parcel. |\n\n| Properties ||\n|-----------------------------------------------------------------------------------------|----------------------------------------------------------|\n| static [Parcelable.Creator](../../../os/Parcelable.Creator.html#)\\\u003c[ObserverSpec](#)!\\\u003e | [CREATOR](#CREATOR:android.os.Parcelable.Creator) \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### getFilterSchemas\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 3](https://developer.android.com/sdkExtensions) \n\n```\nfun getFilterSchemas(): MutableSet\u003cString!\u003e\n```\n\nReturns the list of schema types which observers using this spec will trigger on.\n\nIf empty, the observers will trigger on all schema types.\n\n| Return ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|\n| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\u003e | This value cannot be `null`. |\n\n### writeToParcel\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun writeToParcel(\n dest: Parcel, \n flags: Int\n): Unit\n```\n\nFlatten this object in to a Parcel.\n\n| Parameters ||\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `dest` | [Parcel](../../../os/Parcel.html#): This value cannot be `null`. |\n| `flags` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Additional flags about how the object should be written. May be 0 or [PARCELABLE_WRITE_RETURN_VALUE](../../../os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int). Value is either `0` or a combination of [android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE](../../../os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE:kotlin.Int), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |\n\nProperties\n----------\n\n### CREATOR\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [T Extensions 13](https://developer.android.com/sdkExtensions) \n\n```\nstatic val CREATOR: Parcelable.Creator\u003cObserverSpec!\u003e\n```"]]