android-sdk
android-sdk copied to clipboard
`CouldNotFindSpotifyApp` exception being thrown when Spotify App is installed
Issue found on March 2, 2020.
SDK Version:
Spotify Android SDK v7.0.0;AppRemote v1.2.3 Auth;Spotify app version: v8.5.47.1006.
OS Version:
Android 4.4+
Scope(s):
user-read-private;user-read-playback-state;user-modify-playback-state;user-read-currently-playing;app-remote-control.
Steps to reproduce:
- have the Spotify app installed and be logged in.
- on a secondary app that uses the Spotify SDK, try to connect to the Spotify:
val connectionParams = ConnectionParams
.Builder(context.getString(R.string.spotify_client_id))
.setRedirectUri(context.getString(R.string.spotify_redirect_uri))
.showAuthView(redirectToLoginIfNeeded)
.build()
SpotifyAppRemote.connect(
context,
connectionParams,
object : Connector.ConnectionListener {
override fun onFailure(throwable: Throwable?) {
// Failed
}
override fun onConnected(spotifyAppRemote: SpotifyAppRemote?) {
// Succeeded
}
}
)
Expected behaviour:
Successfully connect to Spotify
Actual behaviour:
For some users, the CouldNotFindSpotifyApp exception is thrown even though the user has the Spotify App installed on his device.
P.S.
Unfortunately we could not reproduce that misbehavior locally, but we have some users complaining about it.
Hi o/
Is Spotify still giving support to this repository/sdk?
what else should we use..? :/
A new info has been given by one of the users. The user said that that problem started to happen after he had his device formatted.
@mdelolmo, Hi o/. Do you know if anyone from Spotify is currently working on the Spotify SDK for Android? This issue and several others have been opened for a long time without any reply from the Spotify team.
Thanks :D
Same problem here, can't find a solution anywhere and Spotify doesn't seem to want to help.
I tried rolling back to an older version (0.6.0) of the App Remote .aar, but it is the same problem as with the current version (0.7.1)
Reproducible on Pixel 3 AVD and on actual Pixel 3, both with Spotify installed.
Apparently, I needed to allow Spotify to be searched before trying to search for it! This may be common knowledge, but it wasn't to me.
Added this to the manifest file:
<queries>
<package android:name="com.spotify.music" />
</queries>
@ChristopherCarignan I was having the exact same issue. Your fix worked! THANK YOU! This requirement should really be more clearly communicated by Spotify.
Hi. Sorry for my late reply, @ChristopherCarignan. But that's a bit strange. The problem comes long before the release of Android 11, so I believe it may still happen even after adding those lines to the AndroidManifest.
Android 11 was released around September / 2020. The problem comes from long before March / 2020.
Is there a solution to this? I've tried the solution that @ChristopherCarignan gave but the issue still remains.
