SpotifyApi
SpotifyApi copied to clipboard
Change Application for Context.
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.
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
.