Class DeviceInfo

  • All Implemented Interfaces:
    Bundleable

    public final class DeviceInfo
    extends Object
    implements Bundleable
    Information about the playback device.
    • Field Detail

      • PLAYBACK_TYPE_LOCAL

        public static final int PLAYBACK_TYPE_LOCAL
        Playback happens on the local device (e.g. phone).
        See Also:
        Constant Field Values
      • PLAYBACK_TYPE_REMOTE

        public static final int PLAYBACK_TYPE_REMOTE
        Playback happens outside of the device (e.g. a cast device).
        See Also:
        Constant Field Values
      • UNKNOWN

        public static final DeviceInfo UNKNOWN
        Unknown DeviceInfo.
      • playbackType

        public final @com.google.android.exoplayer2.DeviceInfo.PlaybackType int playbackType
        The type of playback.
      • minVolume

        public final int minVolume
        The minimum volume that the device supports.
      • maxVolume

        public final int maxVolume
        The maximum volume that the device supports.
    • Constructor Detail

      • DeviceInfo

        public DeviceInfo​(@com.google.android.exoplayer2.DeviceInfo.PlaybackType int playbackType,
                          int minVolume,
                          int maxVolume)
        Creates device information.
    • Method Detail

      • equals

        public boolean equals​(@Nullable
                              Object obj)
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toBundle

        public Bundle toBundle()
        Description copied from interface: Bundleable
        Returns a Bundle representing the information stored in this object.
        Specified by:
        toBundle in interface Bundleable