kaaes / spotify-web-api-android

A wrapper for Spotify Web API. It uses Retrofit to create Java interfaces from API endpoints

Home Page:http://kaaes.github.io/spotify-web-api-android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silent Auth in BroadcastReceiver?

Finni123 opened this issue · comments

commented

Is it possible to get an auth token via normal login, store that in a shared preference and use it to access the API in a BroadcastReceiver without having to call a login activity? I need to use the api repeatedly in the background and I want to use the AlarmManager for that, but I haven't found a way to access the api from a BroadcastReceiver without having to show the login activity.

I think that's what's happening in the sample-search project, but I actually don't really get that.

I would appreciate it if someone could tell me if this is possible or not, and if so, how?