Stay organized with collections
Save and categorize content based on your preferences.
ChannelInfo
data
class
ChannelInfo
:
AbstractSafeParcelable
Information used to identify a channel.
Summary
annotation
The type of the channel, indicating whether it was opened by this device, or accepted from a
remote device.
The channel was opened remotely, and accepted locally.
The channel was opened locally.
Information used to identify a channel.
Required Parcelable Creator.
Constants
INCOMING_CHANNEL
const
val
INCOMING_CHANNEL
:
Int
The channel was opened remotely, and accepted locally.
Value: 2
OUTGOING_CHANNEL
const
val
OUTGOING_CHANNEL
:
Int
The channel was opened locally.
Value: 1
Public constructors
<init>
ChannelInfo
(
channelName
:
String
,
channelType
:
Int
)
Information used to identify a channel.
Public methods
writeToParcel
fun
writeToParcel
(
dest
:
Parcel
,
flags
:
Int
)
:
Unit
Properties
channelName
val
channelName
:
String
Name of the channel
channelType
val
channelType
:
Int
Type of the channel
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\u003eChannelInfo\u003c/code\u003e is a data class used to identify a channel, containing information about the channel's name and type.\u003c/p\u003e\n"],["\u003cp\u003eChannels can be either \u003ccode\u003eINCOMING_CHANNEL\u003c/code\u003e (opened remotely and accepted locally) or \u003ccode\u003eOUTGOING_CHANNEL\u003c/code\u003e (opened locally).\u003c/p\u003e\n"],["\u003cp\u003eThe class implements \u003ccode\u003eParcelable\u003c/code\u003e for serialization and includes properties for the channel name (\u003ccode\u003echannelName\u003c/code\u003e) and type (\u003ccode\u003echannelType\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eCREATOR\u003c/code\u003e is provided for creating instances of \u003ccode\u003eChannelInfo\u003c/code\u003e from a \u003ccode\u003eParcel\u003c/code\u003e.\u003c/p\u003e\n"]]],["`ChannelInfo` identifies a channel using a name and type. The `channelType` indicates if the channel was opened locally (`OUTGOING_CHANNEL`, value 1) or remotely and accepted locally (`INCOMING_CHANNEL`, value 2). It includes a constructor to create `ChannelInfo` objects, and properties to access the `channelName` and `channelType`. The `writeToParcel` function allows data to be written to a `Parcel` and it includes a required `CREATOR` for parcelable operations.\n"],null,["# ChannelInfo\n===========\n\n```\ndata class ChannelInfo : AbstractSafeParcelable\n```\n\n|---------------------------------------------------|\n| [com.google.android.gms.dtdi.core.ChannelInfo](#) |\n\nInformation used to identify a channel.\n\nSummary\n-------\n\n| ### Nested classes ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| annotation | [ChannelType](/android/reference/com/google/android/gms/dtdi/core/ChannelInfo.ChannelType) The type of the channel, indicating whether it was opened by this device, or accepted from a remote device. |\n\n| ### Constants ||\n|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| const [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [INCOMING_CHANNEL](#Companion.INCOMING_CHANNEL:kotlin.Int) The channel was opened remotely, and accepted locally. |\n| const [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [OUTGOING_CHANNEL](#Companion.OUTGOING_CHANNEL:kotlin.Int) The channel was opened locally. |\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [\u003cinit\u003e](#%3Cinit%3E(kotlin.String,%20kotlin.Int))`(`channelName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `channelType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Information used to identify a channel. |\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) | [channelName](#channelName:kotlin.String) Name of the channel |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [channelType](#channelType:kotlin.Int) Type of the channel |\n\n| ### Companion properties ||\n|-----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [Creator](https://developer.android.com/reference/android/os/Parcelable/Creator.html)\\\u003c[ChannelInfo](#)\\\u003e | [CREATOR](#Companion.CREATOR:android.os.Parcelable.Creator) Required Parcelable Creator. |\n\nConstants\n---------\n\n### INCOMING_CHANNEL\n\n```\nconst val INCOMING_CHANNEL: Int\n```\n\nThe channel was opened remotely, and accepted locally. \n\n Value: 2\n\n### OUTGOING_CHANNEL\n\n```\nconst val OUTGOING_CHANNEL: Int\n```\n\nThe channel was opened locally. \n\n Value: 1\n\nPublic constructors\n-------------------\n\n### \\\u003cinit\\\u003e\n\n```\nChannelInfo(\n channelName: String, \n channelType: Int)\n```\n\nInformation used to identify a channel.\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### channelName\n\n```\nval channelName: String\n```\n\nName of the channel \n\n### channelType\n\n```\nval channelType: Int\n```\n\nType of the channel\n\nCompanion properties\n--------------------\n\n### CREATOR\n\n```\nval CREATOR: Creator\u003cChannelInfo\u003e\n```\n\nRequired Parcelable Creator."]]