How to implement ooVoo library in android?

拜拜、爱过 提交于 2020-01-03 03:26:05

问题


I am trying to implement ooVoo library that provide's video, audio chat between user's, and I have downloaded the SDK from this Link after registration.

I have read the documentation for ooVoo library but somehow i am not able to run even it's sample demo. So if anyone have implemented this library then please guide me how to do this ?

I have added oovooSdk.jar file to my project.

When I try to run this app first time I am getting following error in my logcat.

04-03 09:35:21.054: E/dalvikvm(1914): dlopen("/data/app-lib/com.ooVoo.oovoosample-1/liboovoo-sdk.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libva.so" needed by "liboovoo-sdk.so"; caused by load_library(linker.cpp:745): library "libva.so" not found
04-03 09:35:21.054: D/AndroidRuntime(1914): Shutting down VM
04-03 09:35:21.054: W/dalvikvm(1914): threadid=1: thread exiting with uncaught exception (group=0xb4ce9908)
04-03 09:35:21.084: E/AndroidRuntime(1914): FATAL EXCEPTION: main
04-03 09:35:21.084: E/AndroidRuntime(1914): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libva.so" needed by "liboovoo-sdk.so"; caused by load_library(linker.cpp:745): library "libva.so" not found
04-03 09:35:21.084: E/AndroidRuntime(1914):     at java.lang.Runtime.loadLibrary(Runtime.java:371)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at java.lang.System.loadLibrary(System.java:535)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at com.oovoo.core.ConferenceCore.<init>(ConferenceCore.java:289)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at com.oovoo.core.ConferenceCore.instance(ConferenceCore.java:176)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at com.ooVoo.oovoosample.ConferenceManager.<init>(ConferenceManager.java:103)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at com.ooVoo.oovoosample.ConferenceManager.getInstance(ConferenceManager.java:94)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at com.ooVoo.oovoosample.Main.MainActivity.initConferenceManager(MainActivity.java:104)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at com.ooVoo.oovoosample.Main.MainActivity.onCreate(MainActivity.java:58)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.app.Activity.performCreate(Activity.java:5104)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.os.Looper.loop(Looper.java:137)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at android.app.ActivityThread.main(ActivityThread.java:5039)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at java.lang.reflect.Method.invokeNative(Native Method)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at java.lang.reflect.Method.invoke(Method.java:511)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
04-03 09:35:21.084: E/AndroidRuntime(1914):     at dalvik.system.NativeStart.main(Native Method)

回答1:


I know is an old question, but the ooVoo SDK uses native code and requires the JNI to interact with the FFI. Depending on your IDE, these libs need placed in various locations.

The oovoosdk.jar is going out looking for these .so files and it is not finding them. Get those libs linked correctly and it will work fine.

Using Eclipse

At the time of writing, with Android Studio, the files need to be placed in, src/main/jniLibs and do a "Gradle Sync" with project after placing them in.




回答2:


Just login to ooVoo developers site ,

  1. After loging-in go to dashboard
  2. Click CREATE A NEW APP button - AppId will be generated
  3. Click VIEW button and again click VIEW TOKEN and Again click ADD TOKEN - token will be generated
  4. Place the AppID inside meta-data of Manifest file.
  5. Also place your TOKEN inside meta-data of Manifest file. Please be careful while copying TOKEN. RUN IT ON A REAL TIME DEVICE. THIS WORKED FOR ME. Hope this steps help you.



回答3:


Make sure you deployed all .so files to the device.

ooVoo SDK is provided for 2 platforms - x86 and armeabi v7a. armeabi implementation has only 1 .so file, x86 has 3.

Some android devices do not handle it correctly - they expect same files for both platforms. In order to solve it you can create empty files (with size 0) with the names libva-android.so and libva.so in arm folder - should help.




回答4:


This solved the problem for me:

public class MyActivity extends Activity {
    ...
    static {
        System.loadLibrary("oovoo-sdk");
    }
    ...
}


来源:https://stackoverflow.com/questions/22834212/how-to-implement-oovoo-library-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!