Android
Android Java SDK
The Rdio Android SDK lets developers call the web service API, authenticate users if the Rdio Android app is installed, and play full song streams or 30 second samples.
Full API documentation is available: http://www.rdio.com/media/static/developer/android/docs/
To get started:
- Get a developer key and secret from http://developer.rdio.com
- Clone the sample app https://github.com/rdio/hello-android
- Make sure you uncomment and change the appKey & appSecret to your developer key & secret
- Download the Rdio Android SDK and OAuth Signpost JARs
- Add references to the jars into your Eclipse project
Android Playback Intents
When the Rdio app on Android plays music it broadcasts intents so that other applications can react. For consistency with other music player applications on Android we emit com.rdio.android.metachanged and com.rdio.android.playstatechanged intents whenever the playing track changes, playback starts or stops, etc. These intents have the following extras:
- track
- String - track name
- artist
- String - artist name
- album
- String - album name
- position
- int - playback position in milliseconds
- duration
- int - track duration in seconds
- rdioTrackKey
- String - the key of the track being played
- rdioSourceKey
- String - the key of the source being played
- isPaused
- boolean - is the track paused
- isPlaying
- boolean - is the track playing
There's additional discussion on this topic on in the rdio-api Google Group.