<?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 Got failure when connect SpotifyAppRemote in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Got-failure-when-connect-SpotifyAppRemote/m-p/5620202#M10238</link>
    <description>&lt;DIV&gt;&lt;SPAN class=""&gt;May I ask if anyone has encountered any error reports:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;com.spotify.android.appremote.api.error.CouldNotFindSpotifyApp&lt;/SPAN&gt; &lt;SPAN class=""&gt;at com.spotify.android.appremote.api.LocalConnector.connect(LocalConnector.java:52)&lt;/SPAN&gt; &lt;SPAN class=""&gt;at com.spotify.android.appremote.api.SpotifyAppRemote.connect(SpotifyAppRemote.java:73)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;This error occurred when I tried to connect to the server to obtain the spotifyAppRemote instance after successfully logging in and authentication. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;The aar versions used were spotify-app-remote-release-0.7.0.aar and spotify-auth-release-1.2.1.aar&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;As my code below, the connect interface returns onFailure, I have already install the Spotify app in my device.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;private void connectToSpotifyAppRemote() {
        SpotifyAppRemote.setDebugMode(true);
        SpotifyAppRemote.connect(this, new ConnectionParams.Builder(CLIENT_ID)
                .setRedirectUri(REDIRECT_URI)
                .showAuthView(false)
                .build(), new Connector.ConnectionListener() {
            @Override
            public void onConnected(SpotifyAppRemote spotifyAppRemote) {
                mSpotifyAppRemote = spotifyAppRemote;
                // Play a playlist
                mSpotifyAppRemote.getPlayerApi().play("spotify:playlist:37i9dQZF1DX2sUQwD7tbmL");

                // Subscribe to PlayerState
                mSpotifyAppRemote.getPlayerApi()
                        .subscribeToPlayerState()
                        .setEventCallback(playerState -&amp;gt; {
                            final Track track = playerState.track;
                            if (track != null) {
                            }
                        });
            }

            @Override
            public void onFailure(Throwable throwable) {
            }
        });
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;How can I resolve this issue?&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 08 Aug 2023 08:34:07 GMT</pubDate>
    <dc:creator>liyuxin</dc:creator>
    <dc:date>2023-08-08T08:34:07Z</dc:date>
    <item>
      <title>Got failure when connect SpotifyAppRemote</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Got-failure-when-connect-SpotifyAppRemote/m-p/5620202#M10238</link>
      <description>&lt;DIV&gt;&lt;SPAN class=""&gt;May I ask if anyone has encountered any error reports:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;com.spotify.android.appremote.api.error.CouldNotFindSpotifyApp&lt;/SPAN&gt; &lt;SPAN class=""&gt;at com.spotify.android.appremote.api.LocalConnector.connect(LocalConnector.java:52)&lt;/SPAN&gt; &lt;SPAN class=""&gt;at com.spotify.android.appremote.api.SpotifyAppRemote.connect(SpotifyAppRemote.java:73)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;This error occurred when I tried to connect to the server to obtain the spotifyAppRemote instance after successfully logging in and authentication. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;The aar versions used were spotify-app-remote-release-0.7.0.aar and spotify-auth-release-1.2.1.aar&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;As my code below, the connect interface returns onFailure, I have already install the Spotify app in my device.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;private void connectToSpotifyAppRemote() {
        SpotifyAppRemote.setDebugMode(true);
        SpotifyAppRemote.connect(this, new ConnectionParams.Builder(CLIENT_ID)
                .setRedirectUri(REDIRECT_URI)
                .showAuthView(false)
                .build(), new Connector.ConnectionListener() {
            @Override
            public void onConnected(SpotifyAppRemote spotifyAppRemote) {
                mSpotifyAppRemote = spotifyAppRemote;
                // Play a playlist
                mSpotifyAppRemote.getPlayerApi().play("spotify:playlist:37i9dQZF1DX2sUQwD7tbmL");

                // Subscribe to PlayerState
                mSpotifyAppRemote.getPlayerApi()
                        .subscribeToPlayerState()
                        .setEventCallback(playerState -&amp;gt; {
                            final Track track = playerState.track;
                            if (track != null) {
                            }
                        });
            }

            @Override
            public void onFailure(Throwable throwable) {
            }
        });
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;How can I resolve this issue?&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Aug 2023 08:34:07 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Got-failure-when-connect-SpotifyAppRemote/m-p/5620202#M10238</guid>
      <dc:creator>liyuxin</dc:creator>
      <dc:date>2023-08-08T08:34:07Z</dc:date>
    </item>
  </channel>
</rss>

