Stay organized with collections
Save and categorize content based on your preferences.
SelectedDevice
data class SelectedDevice : AbstractSafeParcelable, ReflectedParcelable
A data class encapsulating the unique identifier (token) of a device and its related information
(such as the device name). It's used in GetDevicesResult, the output from DTDI's device picker
activity, to represent the device associated with a specific telecom call ID.
Summary
Public constructors
|
A data class encapsulating the unique identifier (token) of a device and its related information
(such as the device name).
|
Properties
|
String |
The user-facing name associated with this device.
|
RemoteAppScope? |
When nonnull, represents the remote app on the other side of the cross app channel.
|
IBinder |
The token used to identify this device.
|
Public constructors
<init>
SelectedDevice(
token: IBinder,
displayName: String,
remoteAppScope: RemoteAppScope? = null)
A data class encapsulating the unique identifier (token) of a device and its related information
(such as the device name). It's used in GetDevicesResult, the output from DTDI's device picker
activity, to represent the device associated with a specific telecom call ID.
Public methods
Properties
displayName
val displayName: String
The user-facing name associated with this device.
remoteAppScope
val remoteAppScope: RemoteAppScope?
When nonnull, represents the remote app on the other side of the cross app channel. On the
originating device, this is the alternate package that is allowed and launched. On the
receiving device, this is the origin package.
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.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eSelectedDevice\u003c/code\u003e is a data class that stores a device's unique identifier (token), display name, and optional remote app scope.\u003c/p\u003e\n"],["\u003cp\u003eIt's primarily used in DTDI's device picker results (\u003ccode\u003eGetDevicesResult\u003c/code\u003e) to represent the chosen device for a telecom call.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etoken\u003c/code\u003e property is crucial for identifying the target device in certain DTDI client operations.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edisplayName\u003c/code\u003e provides a user-friendly name for the device, while \u003ccode\u003eremoteAppScope\u003c/code\u003e handles cross-app communication details.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements \u003ccode\u003eParcelable\u003c/code\u003e for easy data transfer between components.\u003c/p\u003e\n"]]],["`SelectedDevice` is a data class that holds a device's unique identifier (token), its display name, and optional `RemoteAppScope` information. It is used in `GetDevicesResult` from the device picker to represent a device linked to a telecom call ID. Key actions include initializing with a token, display name, and optionally a remote app scope and writing the data to a `Parcel`. It has properties such as `displayName`, `remoteAppScope`, and `token`. The `CREATOR` companion property is also provided.\n"],null,["# SelectedDevice\n==============\n\n```\ndata class SelectedDevice : AbstractSafeParcelable, ReflectedParcelable\n```\n\n|------------------------------------------------------|\n| [com.google.android.gms.dtdi.core.SelectedDevice](#) |\n\nA data class encapsulating the unique identifier (token) of a device and its related information\n(such as the device name). It's used in [GetDevicesResult](/android/reference/com/google/android/gms/dtdi/core/GetDevicesResult), the output from DTDI's device picker\nactivity, to represent the device associated with a specific telecom call ID.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [\u003cinit\u003e](#%3Cinit%3E(android.os.IBinder,%20kotlin.String,%20com.google.android.gms.dtdi.core.RemoteAppScope))`(`token:` `[IBinder](https://developer.android.com/reference/android/os/IBinder.html)`, `displayName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `remoteAppScope:` `[RemoteAppScope](/android/reference/com/google/android/gms/dtdi/core/RemoteAppScope)?` `=` null)` A data class encapsulating the unique identifier (token) of a device and its related information (such as the device name). |\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| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [displayName](#displayName:kotlin.String) The user-facing name associated with this device. |\n| [RemoteAppScope](/android/reference/com/google/android/gms/dtdi/core/RemoteAppScope)? | [remoteAppScope](#remoteAppScope:com.google.android.gms.dtdi.core.RemoteAppScope) When nonnull, represents the remote app on the other side of the cross app channel. |\n| [IBinder](https://developer.android.com/reference/android/os/IBinder.html) | [token](#token:android.os.IBinder) The token used to identify this device. |\n\n| ### Companion properties ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|\n| [Creator](https://developer.android.com/reference/android/os/Parcelable/Creator.html)\\\u003c[SelectedDevice](#)\\\u003e | [CREATOR](#Companion.CREATOR:android.os.Parcelable.Creator) \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### \\\u003cinit\\\u003e\n\n```\nSelectedDevice(\n token: IBinder, \n displayName: String, \n remoteAppScope: RemoteAppScope? = null)\n```\n\nA data class encapsulating the unique identifier (token) of a device and its related information\n(such as the device name). It's used in [GetDevicesResult](/android/reference/com/google/android/gms/dtdi/core/GetDevicesResult), the output from DTDI's device picker\nactivity, to represent the device associated with a specific telecom call ID.\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### displayName\n\n```\nval displayName: String\n```\n\nThe user-facing name associated with this device. \n\n### remoteAppScope\n\n```\nval remoteAppScope: RemoteAppScope?\n```\n\nWhen nonnull, represents the remote app on the other side of the cross app channel. On the\noriginating device, this is the alternate package that is allowed and launched. On the\nreceiving device, this is the origin package. \n\n### token\n\n```\nval token: IBinder\n```\n\nThe token used to identify this device. Some APIs in [DtdiClient](/android/reference/com/google/android/gms/dtdi/core/DtdiClient) like [sendPayload](/android/reference/com/google/android/gms/dtdi/core/DtdiClient#sendPayload(com.google.android.gms.dtdi.core.ChannelInfo,%20android.os.IBinder,%20kotlin.ByteArray)) and [registerPayloadReceiver](/android/reference/com/google/android/gms/dtdi/core/DtdiClient#registerPayloadReceiver(com.google.android.gms.dtdi.core.ChannelInfo,%20android.os.IBinder,%20com.google.android.gms.dtdi.core.OnPayloadReceivedCallback))\nrequires this token to be passed back identify the target device.\n\nCompanion properties\n--------------------\n\n### CREATOR\n\n```\nval CREATOR: Creator\u003cSelectedDevice\u003e\n```"]]