title: Spotify Apps API: Detect offline mode
body: <p>Is there some way to detect whether Spotify is in Offline mode? I am currently developing an app which clearly depends on a working internet connection. I would like to be able to detect whether there is a connection to the internet at all and if not, show an error message.</p>
  
  <p>I have found some general solutions for javascript which did not seem to work, like:</p>
  
  <pre><code>var online = navigator.onLine;
  </code></pre>