All Projects → spotify → Android Auth

spotify / Android Auth

Licence: apache-2.0
Spotify authentication and authorization for Android. Part of the Spotify Android SDK.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Auth

Deej A.i.
Create automatic playlists by using Deep Learning to *listen* to the music
Stars: ✭ 57 (-38.04%)
Mutual labels:  spotify
Spotifycurrentlyplaying.js
Display your currently playing Spotify song(s) using Last.fm scrobbling.
Stars: ✭ 71 (-22.83%)
Mutual labels:  spotify
I3 Polybar Config
My i3 configuration with polybar for HiDPI screen (4k)
Stars: ✭ 84 (-8.7%)
Mutual labels:  spotify
Addon Spotify Connect
Spotify Connect - Home Assistant Community Add-ons
Stars: ✭ 60 (-34.78%)
Mutual labels:  spotify
Playify
Open Spotify links in various other streaming services
Stars: ✭ 66 (-28.26%)
Mutual labels:  spotify
Spotispy
Displays the album art from your currently playing Spotify track in full-screen.
Stars: ✭ 74 (-19.57%)
Mutual labels:  spotify
Librespot
Open Source Spotify client library
Stars: ✭ 1,083 (+1077.17%)
Mutual labels:  spotify
Botify
Discord bot that plays Spotify tracks and YouTube videos or any URL including Soundcloud links and Twitch streams
Stars: ✭ 86 (-6.52%)
Mutual labels:  spotify
Spotify Onthego
Download Spotify playlists by searching for audio files on YouTube
Stars: ✭ 66 (-28.26%)
Mutual labels:  spotify
Exportify
Export Spotify playlists using the Web API. Analyze them in the Jupyter notebook.
Stars: ✭ 80 (-13.04%)
Mutual labels:  spotify
Headfon.es
a mini Spotify clone 🎧
Stars: ✭ 62 (-32.61%)
Mutual labels:  spotify
Vibe
Get insights into your Spotify listening history 🎶
Stars: ✭ 67 (-27.17%)
Mutual labels:  spotify
Atomify
Where Atom meets Spotify (for Macs)
Stars: ✭ 76 (-17.39%)
Mutual labels:  spotify
Catify
Utility for Spotify, even your cat can use Spotify now !
Stars: ✭ 59 (-35.87%)
Mutual labels:  spotify
Spotifykit
Swift client for Spotify Web API
Stars: ✭ 84 (-8.7%)
Mutual labels:  spotify
Spotify Tui
Spotify for the terminal written in Rust 🚀
Stars: ✭ 11,061 (+11922.83%)
Mutual labels:  spotify
Vim Spotifysearch
Search spotify in Vim and play songs.
Stars: ✭ 71 (-22.83%)
Mutual labels:  spotify
Whisperify
An interactive way to learn about your favourite songs on Spotify. Quiz yourself on your favourite playlists and share quizzes with friends.
Stars: ✭ 91 (-1.09%)
Mutual labels:  spotify
Spotify Web Api Kotlin
Spotify Web API wrapper for Kotlin/JVM, Kotlin/Android, Kotlin/JS, and Kotlin/Native. Includes a Spotify Web Playback SDK wrapper for Kotlin/JS, and a spotify-auth wrapper for Kotlin/Android
Stars: ✭ 86 (-6.52%)
Mutual labels:  spotify
Pause On Lock
Pause/Resume your music player when locking/unlocking your Linux desktop.
Stars: ✭ 79 (-14.13%)
Mutual labels:  spotify

Spotify Authentication Library

This repository is now a part of spotify/android-sdk. Please post new issues there!

This library is responsible for authenticating the user and fetching the access token that can subsequently be used to play music or in requests to the Spotify Web API.

Integrating the library into your project

To add this library to your project add the reference to its build.gradle file:

implementation "com.spotify.android:auth:1.2.3"

To learn more about working with authentication see the Authentication Guide and the API reference on the developer site.

The following entries are merged into your manifest when you add the library:

<uses-permission android:name="android.permission.INTERNET"/>

<activity
    android:exported="true"
    android:name="com.spotify.sdk.android.authentication.AuthCallbackActivity"
    android:theme="@android:style/Theme.Translucent.NoTitleBar">

    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>

        <data
            android:scheme="@string/com_spotify_sdk_redirect_scheme"
            android:host="@string/com_spotify_sdk_redirect_host"/>
    </intent-filter>
</activity>

<activity
    android:name="com.spotify.sdk.android.authentication.LoginActivity"
    android:theme="@android:style/Theme.Translucent.NoTitleBar">
</activity>

You will need to add the following strings to your project to enable Chrome CustomTabs login flow:

<resources>
    <string name="com_spotify_sdk_redirect_scheme">yourscheme</string>
    <string name="com_spotify_sdk_redirect_host">yourhost</string>
</resources>

So, if you provided bestapp://ismyapp as a redirect URI in the developer console then you set com_spotify_sdk_redirect_scheme to bestapp and com_spotify_sdk_redirect_host to ismyapp.

Since Chrome CustomTabs share credentials with the Chrome instance you have installed you get much better experience logging users in compare to WebView flow.

Sample Code

Checkout the sample project.

Contributing

You are welcome to contribute to this project. Please make sure that:

  • New code is test covered
  • Features and APIs are well documented
  • ./gradlew check must succeed

Code of conduct

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].