Class CurrentlyPlayingContext

    • Method Detail

      • getDevice

        public Device getDevice​()
        Get the currently active device.
        Returns:
        The device that is currently active.
      • getRepeat_state

        public String getRepeat_state​()
        Get the repeat state of the device. (No repeat, track repeat, context repeat)
        Returns:
        The repeat state.
      • getShuffle_state

        public Boolean getShuffle_state​()
        Get the shuffle state of the device.
        Returns:
        If shuffle is on or off.
      • getContext

        public Context getContext​()
        Get the context from where the currently playing track is played from.
        Returns:
        A Context Object. Can be null.
      • getTimestamp

        public Long getTimestamp​()
        Get the Unix timestamp in milliseconds when the time was fetched.
        Returns:
        Unix Millisecond Timestamp when data was fetched.
      • getProgress_ms

        public Integer getProgress_ms​()
        Get the progress of the currently playing track.
        Returns:
        Progress into the currently playing track. Can be null.
      • getIs_playing

        public Boolean getIs_playing​()
        Check whether a track is playing on the device or not.
        Returns:
        If something is currently playing.
      • getItem

        public Track getItem​()
        Get the currently playing track, if the device is playing something.
        Returns:
        The currently playing track. Can be null.
      • builder

        public CurrentlyPlayingContext.Builder builder​()
        Description copied from interface: IModelObject
        Create a builder for building an instance of a model object.
        The type of the builder and its methods depend on its corresponding implementation.
        Returns:
        A builder object.