is there any lib exists for libspotify 12 for andr

2019-06-21 08:00发布

问题:

I want to integrate libspotify as sound/player service and integrate spotify in more then one java applications.

Can anyone suggest me any lib or any code example to get me started?

回答1:

Disclaimer: I work for Spotify

At the moment, Spotify doesn't have a nice Java wrapper for libspotify, but this is definitely something we are thinking about doing in the future. I can't offer an estimate on when this will be available, so if you are dying to get started writing apps which integrate with Spotify, you should use the natively-compiled libspotify for Android rather than waiting for a Java wrapper.

The current preferred way of doing Android work with libspotify is to use the natively-compiled library which can be found on the libspotify website. You'll have to write your own JNI wrappers around it, which can be a bit tricky, but is definitely not an impossible task. :) Unfortunately the documentation for using libspotify under Android is a bit lacking. Again, this is something that Spotify is working to improve.

There is a third-party project called jlibspotify which offers a Java wrapper around libspotify. I personally have not used it before, so I can't comment on how good the project is, but if I recall correctly it is based on an older version of libspotify, so you might be better off going the JNI route detailed above.



回答2:

I noticed that there is also libjahspotify out there, which seems newer than jlibspotify. I haven't tried it though.