An object representing a Cast receiver device.
| int | CAPABILITY_AUDIO_IN | Audio-input device capability. |
| int | CAPABILITY_AUDIO_OUT | Audio-output device capability. |
| int | CAPABILITY_MULTIZONE_GROUP | Device capability flag that indicates the device represents a multi-zone group. |
| int | CAPABILITY_VIDEO_IN | Video-input device capability. |
| int | CAPABILITY_VIDEO_OUT | Video-output device capability. |
| boolean | |
| String |
getDeviceId()
Gets the unique ID for the device.
|
| String |
getDeviceVersion()
Gets the device's version.
|
| String |
getFriendlyName()
Gets the friendly name for the device.
|
| static CastDevice | |
| WebImage |
getIcon(int preferredWidth, int preferredHeight)
Returns a best-fit icon for the requested icon size.
|
| List<WebImage> |
getIcons()
Returns a list of all of the device's icons.
|
| InetAddress |
getInetAddress()
Gets the
InetAddress
of the device.
|
| Inet4Address |
getIpAddress()
This method is deprecated. Use
getInetAddress() instead.
|
| String |
getModelName()
Gets the model name for the device.
|
| int |
getServicePort()
Gets the device's service port.
|
| boolean |
hasCapabilities(int[] capabilities)
Tests if the device supports a given set of capabilities.
|
| boolean |
hasCapability(int capability)
Tests if the device supports a given capability.
|
| boolean |
hasIPv4Address()
Returns true if the
CastDevice
has an Inet4Address
IPv4 address.
|
| boolean |
hasIPv6Address()
Returns true if the
CastDevice
has an Inet6Address
IPv6 address.
|
| boolean |
hasIcons()
Checks if the device has any icons.
|
| int |
hashCode()
Overridden to return a hashcode of the device ID.
|
| boolean |
isOnLocalNetwork()
Returns
true if this CastDevice
is on the local network.
|
| boolean |
isSameDevice(CastDevice
castDevice)
Tests if this device refers to the same physical Cast device as
CastDevice.
|
| void | |
| String |
toString()
Returns a string representation of the device.
|
| void |
writeToParcel(Parcel out, int
flags)
|
Audio-input device capability.
Audio-output device capability.
Device capability flag that indicates the device represents a multi-zone group.
Video-input device capability.
Video-output device capability.
Gets the unique ID for the device.
Gets the device's version.
Gets the friendly name for the device.
Returns the CastDevice
from extras, otherwise null.
Returns a best-fit icon for the requested icon size.
Returns a list of all of the device's icons. If there are no images, returns an empty list.
Gets the InetAddress of
the device. It will be a Inet6Address
in an IPv6-only environment. Otherwise, it will be a Inet4Address.
This method is deprecated.
Use getInetAddress()
instead.
Gets the IPv4 address of the device. If device is on an IPv6-only network, this method will return null.
Gets the model name for the device.
Gets the device's service port.
Tests if the device supports a given set of capabilities.
| capabilities | The set capabilities for which to test. The expected value is one or more of
the following constants:
CAPABILITY_AUDIO_IN,
CAPABILITY_AUDIO_OUT,
CAPABILITY_VIDEO_IN,
CAPABILITY_VIDEO_OUT, or
CAPABILITY_MULTIZONE_GROUP. |
|---|
Tests if the device supports a given capability.
| capability | the capability to test for. The expected value is one of the following
constants:
CAPABILITY_AUDIO_IN,
CAPABILITY_AUDIO_OUT,
CAPABILITY_VIDEO_IN,
CAPABILITY_VIDEO_OUT, or
CAPABILITY_MULTIZONE_GROUP. |
|---|
Returns true if the CastDevice
has an Inet4Address
IPv4 address.
Returns true if the CastDevice
has an Inet6Address
IPv6 address.
Checks if the device has any icons.
Overridden to return a hashcode of the device ID.
Returns true if this CastDevice
is on the local network.
Tests if this device refers to the same physical Cast device as CastDevice.
Two CastDevices
are considered to refer to the same physical device if they have the same device
ID.
| castDevice | The CastDevice
to test. |
|---|
true if the device IDs are the same, else false.Writes the CastDevice
to bundle.
Returns a string representation of the device.