Spotify Interaction
Closed this issue · 9 comments
Describe the bug
Example codes can't interact with spotify.
(Spotify is installed on the device)
To Reproduce
Steps to reproduce the behavior:
- Click on 'get auth token' button
- Sign in
- See [error])
Desktop:
- OS: Windows 10
- Build gradle version: 3.5.4
Smartphone:
- Device: Xiaomi Mi Mix 2
- OS: Android 9
Additional context
Also connectToSpotifyRemote method doesn't work.
Error: 🐛 CouldNotFindSpotifyApp : The Spotify app is not installed on the device
Did you try to setup your own client id and redirect url?
Yes I tried but I'm not sure of my url
Redirect url: "https://accounts.spotify.com/authorize"
I got auth token by changing my redirect url but I'm still getting "🐛 CouldNotFindSpotifyApp : The Spotify app is not installed on the device" error.
So I tried this with the current master checked out and it worked on my side.
Quick question:
For the example code to work you have to add your client id and redirect url from the app the you created on https://developer.spotify.com/dashboard/applications. I guess you already did that.
In this app you created in the spotify dashboard, did you add the Android package and sha1 as shown in the video?
If not you have to add the package displayed in the video and create a local sha1 on your local machine like in the second video
package: de.minimalme.spotify_sdk_example
@Guennx can you elaborate on different spotify version
?
The image you posted shows the categories of the WEB API endpoints. Not all those are exposed to the native iOS and Android SDKs. You can see the readme file for an overview of what is is supported. Is there anything specific that you are missing?
I was using "spotify premium apk" on my test device (unofficial version). I didn't think the problem was caused by this.
I want to search music and playlist, is this possible?
For searching you need to use with the Spotify Web API. It has nothing to do with the "Remote SDK". Having said that, you can use the access token you are getting from this library and use it on the web API calls, so you don't have to care about authentication.
This plugin might help you with the API calls. Otherwise you have to implement them yourself which is not that complicated.