Drivemode / SpotifyApi

Spotify Web API Wrapper with Retrofit and OkClients just for Android. This library includes authentication and account token management feature.
Apache License 2.0
49 stars 10 forks source link

Change Application for Context. #1

Open Wolftein opened 9 years ago

Wolftein commented 9 years ago

Would you consider changing Application parameter to Context instead?, i'm developing a library that has multiple services (Spotify is one) and using the API enforce me to initialise SpotifyAPI in the application instead of a library.

KeithYokoma commented 9 years ago

Sorry for late response...

I don't know all about your library implementation and architecture, but I think you can use Service#getApplication() for initialize SpotifyAPI instance. I want to make sure that SpotifyAPI is available within an Application lifecycle and avoid initializing with Activity or Service context because it is expected that SpotifyAPI instance is a singleton, so we are not planning to replace Application argument type with Context.