<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Android SDK - subscribeToPlayerState called multiple times in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Android-SDK-subscribeToPlayerState-called-multiple-times/m-p/5655018#M11176</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm a software engineer, and I'm working on a new application based on Spotify.&lt;/P&gt;&lt;P&gt;I started to played a playlist, and it's works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But after, I tried to get the player state, and I don't know why, the function&amp;nbsp;&lt;SPAN&gt;subscribeToPlayerState is called multiples times, for the same state,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(for example, when the playlist starting, the playerstate is called 4 times the the same track).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It's a problem for me, because I need to start a process when the player state change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found some similiar subject on Github or stakeoverflow, but no one has a workarround.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to prevent multiple playerstate called ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2023 09:19:41 GMT</pubDate>
    <dc:creator>Bebuck</dc:creator>
    <dc:date>2023-10-20T09:19:41Z</dc:date>
    <item>
      <title>Android SDK - subscribeToPlayerState called multiple times</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Android-SDK-subscribeToPlayerState-called-multiple-times/m-p/5655018#M11176</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm a software engineer, and I'm working on a new application based on Spotify.&lt;/P&gt;&lt;P&gt;I started to played a playlist, and it's works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But after, I tried to get the player state, and I don't know why, the function&amp;nbsp;&lt;SPAN&gt;subscribeToPlayerState is called multiples times, for the same state,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(for example, when the playlist starting, the playerstate is called 4 times the the same track).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It's a problem for me, because I need to start a process when the player state change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found some similiar subject on Github or stakeoverflow, but no one has a workarround.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to prevent multiple playerstate called ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 09:19:41 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Android-SDK-subscribeToPlayerState-called-multiple-times/m-p/5655018#M11176</guid>
      <dc:creator>Bebuck</dc:creator>
      <dc:date>2023-10-20T09:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Android SDK - subscribeToPlayerState called multiple times</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Android-SDK-subscribeToPlayerState-called-multiple-times/m-p/5655061#M11177</link>
      <description>&lt;P&gt;After some test, i saw that the first time, the function is called 6 times, and after (during next/previous track), it's called 4 times.&lt;BR /&gt;I did a workarround in my program with a counter, but now my program will be broken if spotify make an update of this.&lt;/P&gt;&lt;P&gt;I d'ont think this is the better solution&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 12:03:55 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Android-SDK-subscribeToPlayerState-called-multiple-times/m-p/5655061#M11177</guid>
      <dc:creator>Bebuck</dc:creator>
      <dc:date>2023-10-20T12:03:55Z</dc:date>
    </item>
  </channel>
</rss>

