ChannelInfo

public final class ChannelInfo implements Parcelable


Information used to identify a channel.

Summary

Nested types

@Retention(value = AnnotationRetention.SOURCE)
@IntDef(value = [1, 2, 0])
@Target(allowedTargets = [AnnotationTarget.VALUE_PARAMETER])
public annotation ChannelInfo.ChannelType

The type of the channel, indicating whether it was opened by this device, or accepted from a remote device.

Constants

static final int

The channel was opened remotely, and accepted locally.

static final int

No channel type specified, and the channel can be used for both incoming and outgoing messages.

static final int

The channel was opened locally.

Public fields

static final @NonNull Parcelable.Creator<@NonNull ChannelInfo>

Required Parcelable Creator.

Public constructors

ChannelInfo(
    @NonNull String channelName,
    @ChannelInfo.ChannelType int channelType
)

Public methods

boolean
equals(Object other)
final @NonNull String

Name of the channel

final int

This method is deprecated. This field is deprecated and channels can be used for both incoming and outgoing payloads.

int
void
writeToParcel(@NonNull Parcel dest, int flags)

Constants

INCOMING_CHANNEL

public static final int INCOMING_CHANNEL = 2

The channel was opened remotely, and accepted locally.

NO_CHANNEL_TYPE

public static final int NO_CHANNEL_TYPE = 0

No channel type specified, and the channel can be used for both incoming and outgoing messages.

OUTGOING_CHANNEL

public static final int OUTGOING_CHANNEL = 1

The channel was opened locally.

Public fields

CREATOR

public static final @NonNull Parcelable.Creator<@NonNull ChannelInfo> CREATOR

Required Parcelable Creator.

Public constructors

ChannelInfo

public ChannelInfo(
    @NonNull String channelName,
    @ChannelInfo.ChannelType int channelType
)

Public methods

equals

public boolean equals(Object other)

getChannelName

public final @NonNull String getChannelName()

Name of the channel

getChannelType

public final int getChannelType()

Type of the channel. @deprecated This field is deprecated and channels can be used for both incoming and outgoing payloads.

hashCode

public int hashCode()

writeToParcel

public void writeToParcel(@NonNull Parcel dest, int flags)