I am really working on an Android VOIP application that allows the user to create conferences with other users. My limitations are to avoid using a server, such as SIP servers, to implement it, and if I need to use an external library, it should be under the LGPL license. I have successfully done this using the peer-to-peer method using AudioGroup and AudioStream in the android RTP stack.
My problem arises at the 3-peers conference. Using AudioGroup, I turned it on MODE_ECHO_SUPPRESSION, but the results are very bad, and I hear my echo after 3 seconds. I came to the conclusion that the Android RTP stack was not a good solution for my problem, since using AudioGroup makes tweek sound impossible, and echo cancellation seems to work poorly.
When checking VOIP applications, I found a lot that worked quite hard, or rather Jitsi ( homepage ), which use a native code-based java library for RTP material under the LGPL license. I tried using this tutorial to use libjitsi, but unfortunately it gives me an error ... At this time, I am not sure if Libjitsi can use this in an android project, as it is commonly used in Java projects.
The steps I got to get the error (using Android Studio)
- I compiled libjitsi from the build.xml file contained in the sources and put the resulting jar directly in the lib / folder of my project.
- I added the libjitsi.jar dependency in the build.gradle file
- Called by the static method
Libjitsi.start()in the onCreate method of activity.
Error log
01-02 17: 06: 48.304 1523-1523/com.test.example I/LibJitsi: LibJitsi org.jitsi.impl.libjitsi.LibJitsiOSGiImpl. ( .) . java.lang.NoClassDefFoundError: org.osgi.framework.FrameworkUtil org.jitsi.impl.libjitsi.LibJitsiOSGiImpl. (LibJitsiOSGiImpl.java:34) java.lang.Class.newInstanceImpl( ) java.lang.Class.newInstance(Class.java:1319) org.jitsi.service.libjitsi.LibJitsi.start(LibJitsi.java:227) org.jitsi.service.libjitsi.LibJitsi.start(LibJitsi.java:171) com.test.example.ui.createconf.CreateConfActivity.onCreate(CreateConfActivity.java:76) at android.app.Activity.performCreate(Activity.java:4465) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992) at android.app.ActivityThread.access $600 (ActivityThread.java:127) at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1158) android.os.Handler.dispatchMessage(Handler.java:99) android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4441) java.lang.reflect.Method.invokeNative( ) java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) dalvik.system.NativeStart.main(
, - libjitsi AndroidProject, , , , .