How to refresh Access Token on Spotify SDK for Android?
-
I'm making an Android's app using https://github.com/spotify/android-sdk and https://github.com/kaaes/spotify-web-api-android from kaaes. What's the best way to refresh my access token? Since i need to keep the user logged. I don't want that my app ask for log in everytime the users open the app. How can I handle this ? retrofit.RetrofitError: 401 Unauthorized Login to Spotify failed because of invalid credentials Thanks for your time and help! Regards.
-
Answer:
You need to use the Authorization Code flow from the Spotify Web API to obtain a refresh token that you can use to obtain a new access token when yours expires. For that you need to have a web service with which you communicate from the Android app. There is more information on this on https://github.com/spotify/android-sdk/issues/47
Maverick.pe at Stack Overflow Visit the source
Related Q & A:
- How to refresh the Properties Window programatically?Best solution by Stack Overflow
- How to access file from SDK in android?Best solution by Stack Overflow
- How can I access my localhost from my Android device?Best solution by Stack Overflow
- How to refresh listview immediately in Android?Best solution by Stack Overflow
- How to refresh list view dynamically in Android?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.