Skip to content

Get current track position in playlist #359

Open

Description

@vitaliecroitor

UseCase:
We use Spotify Android SDK to stream music in our app. Every time user opens the music player, we want to continue playback with the next song in the playlist we selected. If the playlist has 5 songs, and the user closed the player at song 2, next time he opens the player we want to start the playlist at song 3 which is last position (2) + next (1).

Problem:
There is no api to get the current position of the track in the current playlist. Ideally, the track position will be passed within the PlayerState object as is on the web api

Issue found on 20.03.2024

SDK Version:

0.8.0

OS Version:

Android 10, 11, 12, 13

Scope(s):

PlayerApi, PlayerState

Steps to reproduce:

  1. Connect to Spotify sdk
  2. Start the playlist playback by uri using PlayerApi.play(uri)
  3. Use the PlayerApi.subscribeToPlayerState() to listen to PlayerState changes

Expected behaviour:

The track position in the playlist is part of the PlayerState object

Actual behaviour:

There is no way to get the position of the currently playing track within the playlist.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions