Next open your app’s adle file and add the gson, retrofit, converter-gson and picasso libraries.Īdd the following dependencies to the file. Choose the Empty Activity template on the next screen and on the last screen click Finish. On the next screen I left the Minimum SDK at the default of API 15. Set your own company domain and click on Next. You can find help online on how to use Eclipse.).Ĭreate a new project and name the app SPPlayer. If you’re using Eclipse, some steps taken in the tutorial will be different, for example adding libraries. Create a new Android project (I’m using Android Studio. With that set up, we’ll now create the Android app. Leave the page open as you’ll need to copy the Client ID shown into the Android app. On the next page, you’ll be shown your app’s details. On the screen that follows, name your app. Once you’ve created an account, click on the Register a New App link on the right side of that page. Notice that the dependency name has to match with the module you just added.As mentioned, we are going to create an app that accesses the SoundCloud API, so first you need to register an account on the SoundCloud Developer portal at. STEP3: Don't forget to add this new module as dependency in your adle file. STEP2: Back in your Android Studio project add this Module by following the steps described in the Quick Start Guide to Add the App Remote SDK. STEP1: Download the Android SDK from Spotify's Github repo, make sure you select the new version, which is the one called AppRemote SDK, the one with the aar extension. STEP5: Also make sure to add a redirect URI to use as callback, this could be anything, I use the app's package name. Enter your app's package name and the fingerprint obtained in the previous step. STEP4: Back on your Spotify Dashboard select your app and click on Edit Settings to add a new Android Package. To learn more about authorizing Android Apps and getting debug or release fingerprints check this documentation. This will output a list of Certificate fingerprints, copy the one that says SHA1. In this example I will use the debug fingerprint, which you can obtain running the following command in your terminal: $ keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android STEP3: In order to associate your Android App with the Spotify App, you will need to provide your app's fingerprint. STEP2: Once in the Dashboard, create a new App. STEP1: The first step to use Spotify's SDK is to register your app on Spotify for Developers, if you don't have an account please go ahead and create one, you can use your regular Spotify Account to login. In this guide I'm assuming you already created a new project using Android Studio so let's gets started. I also noticed there's not a lot of information out there to use this new SDK with Kotlin specifically so I decided to create this guide hopping to help anyone else looking to implement this SDK using Kotlin. While I was working on this project I noticed that Spotify published a new SDK for Android and iOS platforms not long ago, their Quick Start Guide is pretty good but all the examples are in Java and as beginner on Kotlin and Android I hit a few walls. It wasn't a complicated app but it was a nice detail and something with the perfect level of complexity for me to continue with my Kotlin learnings. The app was a called MixTape, it was an app with a selection of songs played using Spotify's SDK. On October last year I was on my journey of learning Kotlin when I decided to make an App for my boyfriend, I wanted to combine my interest for Kotlin and music, and at the same time create a nice gift for his birthday.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |