(Beta) The Spotify Android SDK makes it easy to add audio streaming, user authentication and other Spotify features to Android apps.
About the Android SDK
The Spotify Android SDK makes it easy to add Spotify functionality to your Android app. The SDK consists of two small footprint binary libraries that are packaged as an Android archives (AAR):
- User authentication and authorization library
- Audio playback and stream management library
The authentication library provides a way to obtain access tokens that can subsequently be used to play music or use the Web API. The player library allows to play music and takes care of all negotiation with backend Spotify services, including digital rights management and decoding.
The Android SDK does not currently have functions for metadata lookup or playlist management. For that, you need to use the Web API, with which you can communicate after receiving an OAuth token from the SDK. You can use a Spotify Web API Android wrapper.
Downloading the SDK
The Android SDK is available for download from its home on GitHub:
Tutorial and Examples
We provide a beginner’s tutorial to help you set up your build environment and get started with the Android SDK. It leads you through the creation of a simple app that connects to the Spotify service and plays a track.
Within the download package you will also find some example code to help get you started.
The download package includes comprehensive documentation of all API classes. Because Android libraries can not include Javadocs, HTML documentation is shipped within the download zipfile and you can also read the documentation online.
Authentication and Authorization
The Android SDK includes a library for user authentication. When called, this API opens a WebView or a browser window and connects to the Spotify Accounts Service at https://accounts.spotify.com . User authentication and the authorization of scopes then follows the same path as user authentication and authorization for the Spotify Web API. For detailed information, see the Web API Authorization Guide.
Feel free to experiment with the Android SDK beta version and to report problems through the public issue tracker on GitHub.