Stay organized with collections
Save and categorize content based on your preferences.
DeviceFilter
public
interface
DeviceFilter
implements
Parcelable
Known indirect subclasses
|
A filter for companion devices of type D
Summary
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# DeviceFilter\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Inherited Constants](#inhconstants) \\| [Inherited Methods](#inhmethods) \n\nDeviceFilter\n============\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/companion/DeviceFilter \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nDeviceFilter\n`\n\n\n`\n\n\nimplements\n\n`[Parcelable](/reference/android/os/Parcelable)`\n\n\n`\n\n|-------------------------------------------------------------------------------------------------------|\n| android.companion.DeviceFilter\\\u003cD extends [android.os.Parcelable](/reference/android/os/Parcelable)\\\u003e |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [BluetoothDeviceFilter](/reference/android/companion/BluetoothDeviceFilter), [BluetoothLeDeviceFilter](/reference/android/companion/BluetoothLeDeviceFilter), [WifiDeviceFilter](/reference/android/companion/WifiDeviceFilter) |---------------------------------------------------------------------------------|----------------------------------------| | [BluetoothDeviceFilter](/reference/android/companion/BluetoothDeviceFilter) | A filter for Bluetooth(non-LE) devices | | [BluetoothLeDeviceFilter](/reference/android/companion/BluetoothLeDeviceFilter) | A filter for Bluetooth LE devices | | [WifiDeviceFilter](/reference/android/companion/WifiDeviceFilter) | A filter for Wifi devices | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA filter for companion devices of type `D`\n\nSummary\n-------\n\n| ### Inherited constants |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| From interface [android.os.Parcelable](/reference/android/os/Parcelable) |-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [CONTENTS_FILE_DESCRIPTOR](/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) Descriptor bit used with [describeContents()](/reference/android/os/Parcelable#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | [PARCELABLE_WRITE_RETURN_VALUE](/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE) Flag for use with [writeToParcel(Parcel, int)](/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)): 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)`\". | |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[android.os.Parcelable](/reference/android/os/Parcelable)` ` |------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int` | ` `[describeContents](/reference/android/os/Parcelable#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` `[writeToParcel](/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel. | ||"]]