Music player app using the Spotify Android SDK and Spotify Web API.
- Clone this repo:
https://github.com/subho57/spotify-clone.git
- Open the project in Android Studio
- Make sure to have
buildToolsVersion "30.0.3"
You can follow the Spotify Android SDK Tutorial to start the set up.
- Download the Spotify Android playback library zip and Spotify Android auth library zip from GitHub and unzip them.
- In a file explorer (not Android Studio), drag the unzipped spotify-auth-version.aar and spotify-player-version.aar files into the /app/libs directory in your project’s root directory.
- Playback library can be found when you unzip the zipfile. And simply copy this .aar into app/libs
- Auth library needs some more steps.
- Download and unzip
- Remove the auth-sample directory since it is not needed to create .aar file
- In the
\android-auth-1.0\settings.gradle
file, include':app'
- Create
\android-auth-1.0\local.properties
and addsdk.dir=/Users/%YOUR_PC_USERNAME%/Library/Android/sdk
for path to the Android SDK - Run
./gradlew build
and grab an artifact fromauth-lib/build/outputs/aar/
.
This step is needed for registering application fingerprint
echo -n password | shasum -a 1 | awk '{print $1}'
- Follow the instructions from here
If you use Android Studio as recommended, the following dependencies will automatically be installed by Gradle.
android{
vectorDrawables.useSupportLibrary = true
}
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
maven { url "https://jitpack.io" }
}
dependencies {
...
compile 'com.github.iammert:ScalingLayout:1.1'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.spotify.sdk:spotify-android-auth-1.0.0@aar'
compile 'com.spotify.sdk:spotify-player-24-noconnect-2.20b@aar'
compile 'com.github.kaaes:spotify-web-api-android:0.4.1'
}