I am in the planning stages of developing an Android application to control my Spotify player. Since I am running Debian on my system, the options that are available on the Play Store are quite limited (I can't find any functioning apps). Therefore, the programmer inside me tells me to build one. I haven't built an Android application before, but I have good experience with working with APIs so I think this could be a pretty decent starter project for me.
However, I am having some difficulties grasping some of the concepts on how I could implement this. With some research of the Spotify API documentation, I believe the Spotify Apps API is the one I should be using to control playback on the desktop.
On the Android side of things, I would imagine I would use the Spotify Apps API in conjunction with the Libspotify API to receive metadata and display what the application is getting from the desktop playback.
What I am having troubles understanding is how does the Android application talk with the Spotify desktop client? I have a few ideas, but I am unsure...
My thought process so far is as follows:
- have a local webserver on the desktop open up and begin listening
- on the Android application, connect to the desktop's webserver (how do you do this?)
- once connected, the desktop sends metadata/other information to populate the Android application
- from the Android UI, hitting a UI button will send a request to the webserver, where it parses the data, completes an action, and then returns the response to the Android application
I am a little lost on what tools I need to learn and use to get this working. Any suggestions to the implementation are greatly appreciated!
Thank you!