Stay organized with collections
Save and categorize content based on your preferences.
ScanResult
class
ScanResult
:
AbstractSafeParcelable
Represents a device scan result.
Summary
Represents a device scan result.
The current list of available remote devices.
Public constructors
<init>
ScanResult
(
remoteDevices
:
List
<
RemoteDevice
>
)
Represents a device scan result.
Public methods
writeToParcel
fun
writeToParcel
(
dest
:
Parcel
,
flags
:
Int
)
:
Unit
Properties
remoteDevices
val
remoteDevices
:
List
<
RemoteDevice
>
The current list of available remote devices. Devices will drop off the list if they are no
longer available, and be added to the list if they are newly found.
Companion properties
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\u003eScanResult\u003c/code\u003e represents the result of a device scan, containing a list of available remote devices.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to the list of discovered \u003ccode\u003eRemoteDevice\u003c/code\u003e objects through the \u003ccode\u003eremoteDevices\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe list of remote devices is dynamic, updating as devices become available or unavailable.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eScanResult\u003c/code\u003e is Parcelable, allowing it to be passed between components and processes.\u003c/p\u003e\n"]]],["`ScanResult` is a class representing a device scan result, containing a list of `RemoteDevice` objects. It is initialized with a `List` of `RemoteDevice`. The `remoteDevices` property holds the currently available remote devices, which are dynamically updated. The class implements `writeToParcel` for data serialization and has a `CREATOR` object for parcelable implementation. `Remote devices` can be added or removed from the list.\n"],null,["# ScanResult\n==========\n\n```\nclass ScanResult : AbstractSafeParcelable\n```\n\n|--------------------------------------------------|\n| [com.google.android.gms.dtdi.core.ScanResult](#) |\n\nRepresents a device scan result.\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [\u003cinit\u003e](#%3Cinit%3E(kotlin.collections.List))`(`remoteDevices:` `[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)\u003c[RemoteDevice](/android/reference/com/google/android/gms/dtdi/core/RemoteDevice)\u003e`)` Represents a device scan result. |\n\n| ### Public methods ||\n|------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [writeToParcel](#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`dest:` `[Parcel](https://developer.android.com/reference/android/os/Parcel.html)`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` \u003cbr /\u003e |\n\n| ### Properties ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)\\\u003c[RemoteDevice](/android/reference/com/google/android/gms/dtdi/core/RemoteDevice)\\\u003e | [remoteDevices](#remoteDevices:kotlin.collections.List) The current list of available remote devices. |\n\n| ### Companion properties ||\n|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|\n| [Creator](https://developer.android.com/reference/android/os/Parcelable/Creator.html)\\\u003c[ScanResult](#)\\\u003e | [CREATOR](#Companion.CREATOR:android.os.Parcelable.Creator) \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### \\\u003cinit\\\u003e\n\n```\nScanResult(remoteDevices: List\u003cRemoteDevice\u003e)\n```\n\nRepresents a device scan result.\n\nPublic methods\n--------------\n\n### writeToParcel\n\n```\nfun writeToParcel(\n dest: Parcel, \n flags: Int\n): Unit\n```\n\nProperties\n----------\n\n### remoteDevices\n\n```\nval remoteDevices: List\u003cRemoteDevice\u003e\n```\n\nThe current list of available remote devices. Devices will drop off the list if they are no\nlonger available, and be added to the list if they are newly found.\n\nCompanion properties\n--------------------\n\n### CREATOR\n\n```\nval CREATOR: Creator\u003cScanResult\u003e\n```"]]