整合Spotify的Andr​​oid的库

整合Spotify的Andr​​oid的库

问题描述:

所以我想Spotify的库集成到Android应用程序。我去 https://developer.spotify.com/technologies/libspotify/ 并下载其LIB libspotify - 51年1月12日,Android的臂release.tar.gz
问题是,与LIB捆绑在一起的Android的样本实际上不是机器人项目,他们是C code,的lib是一个.so文件。我的Andr​​oid NDK和JNI但文档的基本知识在那里有关库与Android整合是不存在的。任何人都可以提供的只是播放曲目样本?或指向我在哪里可以找到一个样本。

So I wanted to integrate the spotify library into an android app. I went to https://developer.spotify.com/technologies/libspotify/ and downloaded their lib libspotify-12.1.51-Android-arm-release.tar.gz Problem is that the "Android" samples bundled with the lib aren't actually android projects, they are C code, the lib is a .so file. I have basic knowledge of android ndk and jni but the documentation out there about integrating the library with android is non-existent. Can anyone provide a sample of just playing a track? or point me to where i can find a sample.

不幸的是,Spotify的没有为Android一个不错的Java库(见本StackOverflow更多细节问题的),所以你必须手动编写JNI封装。由于libspotify的Andr​​oid编译为pretty新的,有没有对任何例子或者,但我也不会感到惊讶地看到文件很快就包括他们。

Unfortunately, Spotify doesn't have a nice Java library for Android (see this StackOverflow question for more details), so you'll have to manually write a JNI wrapper. As the Android build of libspotify is pretty new, there aren't yet any examples for that either, but I wouldn't be surprised to see the documentation include them soon.

由于@juned在他的评论中指出,这个问题的细节如何让你的Andr​​oid应用链接的libspotify库。一旦你libspotify正确链接,你可以检查出少数的Andr​​oid NDK 的教程更具体的整合帮助。

As @juned noted in his comment, this question details how to get the libspotify libraries linked with your Android app. Once you get libspotify linked correctly, you can check out a few Android NDK tutorials for more specific integration help.

如果您在整合过程中遇到的麻烦,一定要检查出的例子code这Spotify的附带libspotify。在code提供了如何正确地与该库的Spotify的服务谈了很好的参考。

If you have troubles during your integration, be sure to check out the example code which Spotify ships with libspotify. The code provides a good reference of how to properly talk with the Spotify service with the library.