Mobile Friendliness and Spotify Voice

Maxwell You
maxyou
Published in
5 min readOct 5, 2018
Source

Ever since smartphones became mainstream, there has been an outbreak of mobile applications (or apps for short). Websites with large Internet presences started scrambling to figure out how best to deliver their content through this new medium. Apps introduced new players to the space as well: anyone with a novel or interesting idea could publish an app that reached the top of the charts. The popularity of apps can be attributed mainly to their convenience. Our smartphones are always immediately available and apps are launched with just a simple tap. Having to open a browser and then remembering what URL to type in to access your favorite content is no longer necessary.

Currently, Spotify Voice (SV) is technically a desktop application since you have to access it through a browser: there’s no app for it yet. If you are on a mobile device such as a smartphone or tablet, SV will not work as smoothly as on a desktop (or laptop). This blog post will cover why this is and the status of a mobile version of SV.

The Curious Case of Mobile and Spotify Voice

To use Spotify Voice on desktops, you currently have to open Spotify and play/pause a song real quick before the application will work properly. It is required to play/pause a song so SV can detect an “active” device to play music on.

This process would seem to imply that a similar setup process is involved on mobile. You would open the Spotify mobile app, play/pause a song, then open a browser to navigate to SV and begin using the desktop app¹. This should work on your smartphone right? Unfortunately, the answer is not as you might expect. Mobile apps exhibit different behavior than desktop apps. When Spotify is open on your desktop, SV will be able to detect that it is active. However, when on mobile, SV is unable to detect whether or not the Spotify mobile app is open or not. To understand why this is, we first have to understand the different “stages” mobile apps can be in.

¹ For the purposes of distinguishing between desktop and mobile, I will refer to Spotify Voice as being used on desktops as a “desktop app” and on mobile as a “mobile app”. In the past, I have referred to Spotify Voice as a web app in which I meant a desktop app presented in the form of a website.

Imagine you have a list of projects you need to work on. You can’t focus on doing them all at once, so you do one at a time. After spending some time on one project, you switch to another: your context has switched. You haven’t forgotten about the other projects though: they’re just in the background, you are “sleeping” on them. Whatever you are working on currently can be viewed as the active project. The projects that you are “sleeping” on can be viewed as inactive.

Source

Apps on your phone can be thought of in a similar way: AKA the app lifecycle. When you open an app on your phone, it is considered active because the phone is focusing on performing the actions you input. When you switch to another app, the previous app is considered to be “sleeping” (inactive). Relating this to using SV on mobile, when you open the Spotify mobile app, it is active. Opening the browser mobile app will switch the browser to the active app while Spotify goes to sleep. When you try to play music on SV, it will not work because, as mentioned earlier, SV looks for an “active” device to play music on. However, since we are in the browser app and Spotify is “sleeping”, there are no active devices running the Spotify app!

Spotify is a little different than most other mobile apps, however. Spotify can play music while you are using other apps. In these cases, Spotify is considered active even though it isn’t the main app on your screen currently. So, if Spotify is playing music and you try to use SV, it will work! But as soon as you pause a song, Spotify will go back to sleep, and you will be unable to control playback on SV again. This is admittedly not a great user experience at all, so I tried to create a mobile app for SV.

I Tried So Hard and Got So Far, but in the End…

In the past few days, I looked into how to create an Android mobile app and followed some Spotify tutorials for using their Android Software Developer Kit (SDK, which is basically an API). It was challenging to get the tutorials to work since they seemed fairly outdated. Once I got it though, I figured out that the Android SDK (and similarly, the iOS SDK) only allowed for simple control of Spotify’s music playback. You could specify a specific song to play, but only if you knew the Universal Resource Identifier (URI), basically a unique ID, for the song. However, without the ability to search for playlists or songs, it would not have been able to carry out the functionality of SV. I learned that the Android SDK was best for remote controlling other devices running Spotify, such as controlling playback on your laptop through your phone.

This is a bummer since it means that there will most likely not be a mobile app developed for SV anytime soon. The limited functionality of the Android and iOS SDKs are the bottlenecks in creating an app remotely close to what the SV desktop app can offer.

In light of this, I am still trying to get SV to work on mobile. Spotify has a Web Player where you can play music in a browser without having the app open. I think a good solution might be to have SV open the Web Player in another tab and play music on there when using a mobile device. SV wouldn’t have to look for active device anymore and can just play music in-browser.

Our phones are the most convenient form of technology we have, so it makes sense that SV should work similarly on mobile as it does on desktop. Fingers crossed!

Song of the Week

One Week by Barenaked Ladies [Spotify][YouTube]

--

--