Stay organized with collections
Save and categorize content based on your preferences.
DeviceFilter
interface DeviceFilter<D : Parcelable!> : Parcelable
A filter for companion devices of type D
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.
|
|
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,["# DeviceFilter\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDeviceFilter\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/companion/DeviceFilter \"View this page in Java\") \n\n```\ninterface DeviceFilter\u003cD : Parcelable!\u003e : Parcelable\n```\n\n|-------------------------------------|\n| [android.companion.DeviceFilter](#) |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [BluetoothDeviceFilter](/reference/kotlin/android/companion/BluetoothDeviceFilter), [BluetoothLeDeviceFilter](/reference/kotlin/android/companion/BluetoothLeDeviceFilter), [WifiDeviceFilter](/reference/kotlin/android/companion/WifiDeviceFilter) |----------------------------------------------------------------------------------------|----------------------------------------| | [BluetoothDeviceFilter](/reference/kotlin/android/companion/BluetoothDeviceFilter) | A filter for Bluetooth(non-LE) devices | | [BluetoothLeDeviceFilter](/reference/kotlin/android/companion/BluetoothLeDeviceFilter) | A filter for Bluetooth LE devices | | [WifiDeviceFilter](/reference/kotlin/android/companion/WifiDeviceFilter) | A filter for Wifi devices | |\n\nA filter for companion devices of type `D`\n\nSummary\n-------\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| Inherited functions ||\n|---|---|\n| From class [Parcelable](../os/Parcelable.html#) |------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [describeContents](../os/Parcelable.html#describeContents())`()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of [writeToParcel(android.os.Parcel,int)](../os/Parcelable.html#writeToParcel(android.os.Parcel,%20kotlin.Int)), the return value of this method must include the [CONTENTS_FILE_DESCRIPTOR](../os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR:kotlin.Int) bit. \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [writeToParcel](../os/Parcelable.html#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. \u003cbr /\u003e | ||"]]