Mobicents Restcomm Hello-World Implementation - android-studio

I am following Mobicents Restcomm's guide to implement Restcomm Client Android. I am following their quick start guide for that. I have imported their Hello-World program in Android Studio but there are some issues. It is imported but it is throwing some errors. These are as follows:
Error:(5, 18) error: package org.webrtc does not exist
Error:(6, 18) error: package org.webrtc does not exist
Error:(7, 18) error: package org.webrtc does not exist
Error:(19, 31) error: package PeerConnection does not exist
Error:(25, 12) error: cannot find symbol class SessionDescription
Error:(26, 12) error: cannot find symbol class SessionDescription
Error:(27, 17) error: cannot find symbol class IceCandidate
Error:(33, 32) error: package PeerConnection does not exist
Error:(36, 13) error: cannot find symbol class SessionDescription
Error:(36, 47) error: cannot find symbol class IceCandidate
Error:(65, 34) error: cannot find symbol class SessionDescription
Error:(65, 68) error: cannot find symbol class IceCandidate
Error:(110, 57) error: cannot find symbol class SessionDescription
Error:(141, 33) error: cannot find symbol class IceCandidate
Error:(149, 44) error: package PeerConnection does not exist
C:\Users\Nadeem Ilyas\Desktop\restcomm-android-sdk-1.0.0-BETA3\restcomm.android.client.sdk\src\main\java\org\mobicents\restcomm\android\client\sdk\SignalingParameters.java
Please help me fixing this issue. I will really appreciate your help in this matter.

Seems like the jars and/or native libraries for WebRTC implementation cannot be found for some reason. Did you download the latest tar.bz2 bundle from the GitHub release page or did you just clone the GitHub repo?
If you did the first, the jars and libs should be there, but if you cloned the repo you need to download and add separately from GitHub release tarball cause such binary files tend to make the repo huge and we avoid putting them there.
To verify if you have the files needed, please go to RESTCOMM_ANDROID_SDK_ROOT/restcomm.android.client.sdk/libs. There you should find 'libjingle_peerconnection_java.jar'
EDIT:
You will also need to edit MainActivity.java and replace:
params.put("pref_sip_user", "bob");
with:
params.put("pref_sip_user", "android-sdk");
Because bob is a very common user and might be provisioned by someone else with unknown password. That should fix your issue. By the way you can also enable more verbose logging for RCClient by setting the log level before calling RCClient.initialize():
RCClient.setLogLevel(Log.VERBOSE);
Best regards,
Antonis

Related

app:compileDebugJavaWithJavac task failing, erroring out on its own code

I'm getting this error after running npx react-native run-android, and I'm new to react and node in general so I'm not sure what could be going on.
gradle build --warning-mode all runs successfully with no issue. Not sure what could be going on. Running react-native upgrade doesn't help as suggested in similar questions, but it does give the error "Accessing non-existent property 'padLevels' of module exports inside circular dependency", though I think it's unrelated.
I'm on npm 6.14.10, node v14.15.4, Gradle 6.4, react-native-cli 2.0.1, react-native 0.63.4, openjdk 14.0.2
> Task :app:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4/userguide/command_line_interface.html#sec:command_line_warnings
106 actionable tasks: 2 executed, 104 up-to-date
/android/app/src/main/java/com/test/MainApplication.java:20: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
/android/app/src/main/java/com/test/MainApplication.java:59: error: cannot find symbol
if (BuildConfig.DEBUG) {
^
symbol: variable BuildConfig
location: class MainApplication
/android/app/src/main/java/com/test/MainApplication.java:59: error: illegal parenthesized expression
if (BuildConfig.DEBUG) {
^
Note: /android/app/src/debug/java/com/test/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Alljoyn android Events and Actions sample not working

Trying to run Android sample 'Events and Actions' downloaded from https://allseenalliance.org/framework/download
Downloaded 'Core SDK - debug' which has sample eventaction and .apk in bin folder.
Installed it, but doesn't work. Is anyone able to run it?
Edit: Exception in the Logcat:
08-29 09:06:16.978 29314 29328 E AndroidRuntime: Process: org.allseen.sample.eventaction, PID: 29314
08-29 09:06:16.978 29314 29328 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__exidx_end" referenced by "/data/app/org.allseen.sample.eventaction-1/lib/arm/libMyAllJoynCode.so"...
I have tried building the library MyAllJoynCode.so using Android ndk, but I couldn't able to build it. I get below exception
root#jay-dev:~/alljoyn/core/alljoyn/alljoyn_core/samples/eventaction/Android# ndk-build
[arm64-v8a] Compile++ : MyAllJoynCode <= AndroidJNIBridge.cc
In file included from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/atomic.h:30:0,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/ManagedObj.h:38,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/Message.h:30,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/AuthListener.h:32,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/BusAttachment.h:34,
from jni/event/AndroidJNIBridge.cc:19:
/root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/posix/atomic.h:30:25: fatal error: sys/atomics.h: No such file or directory
#include
^
compilation terminated.
/root/android-ndk-r12b/android-ndk-r12b/build/core/build-binary.mk:474: recipe for target 'obj/local/arm64-v8a/objs/MyAllJoynCode/event/AndroidJNIBridge.o' failed
make: *** [obj/local/arm64-v8a/objs/MyAllJoynCode/event/AndroidJNIBridge.o] Error 1
It looks like you were using Android NDK level 20 (or later).
The NDK's android-20 platform directory no longer contains the atomics.h file (they removed it), which caused the AllJoyn build failure you saw:
dist/cpp/inc/qcc/posix/atomic.h:30:25: fatal error: sys/atomics.h: No such file or directory
Prior to AllJoyn release 16.10, a workaround is simply to copying the NDK's android-19 atomics.h file to its android-20 (or later) platform directory.
However, the AllJoyn-related issue has been fixed as of September 2016 (i.e. no longer dependent on atomics.h), and the fix is included in AllJoyn release 16.10.
More information is provided in JIRA https://jira.allseenalliance.org/browse/ASACORE-3216

Build latest hCsound with cabal

I'm trying to build hCsound-0.4.2 on Debian-linux machine, it seems, that since 2012 (latest version) there were some changes in csound.h file, but I'm not sure.
When trying cabal install hcsound I get following
Configuring hCsound-0.4.2...
cabal: Missing dependency on a foreign library:
* Missing (or bad) header file: csound.h
I have libcsound64-dev of version 1:6.02~dfsg-2, which installs csound.h into /usr/include/csound/, so I did following:
cabal unpack hcsound
cd hCsound-0.4.2
cabal configure --extra-include-dirs=/usr/include/csound
cabal build
In that case, configuring is done nicely, but I get errors on build stage:
Preprocessing library hCsound-0.4.2...
c2hs: Error limit of 20 errors has been reached.
src/Sound/Csound/Foreign.chs:1224: (column 14) [ERROR] >>> Unknown identifier!
Cannot find a definition for `csoundSetControlChannelParams' in the header file.
src/Sound/Csound/Foreign.chs:1118: (column 11) [ERROR] >>> Unknown identifier!
Cannot find a definition for `CsoundChannelListEntry' in the header file.
src/Sound/Csound/Foreign.chs:1113: (column 22) [ERROR] >>> Unknown identifier!
Cannot find a definition for `CsoundChannelListEntry' in the header file.
src/Sound/Csound/Foreign.chs:1111: (column 23) [ERROR] >>> Unknown identifier!
Cannot find a definition for `CsoundChannelListEntry' in the header file.
...
Some of the mentioned function names are present in /usr/include/csound/csound.h, some are not. Is there a possibility that c2hs processes wrong header?
What can be done to find out possible reasons for incorrect (?) behaviour? Has someone experience of building hCsound recently?
My intention is to use the library go produce sound output from Haskell program, so if anyone suggests better solution, it would also be great. I already failed to install haskore-supercollider, I have haskore package, but did not managed to get if it can produce sound in real time.

Haskell Plugins and cabal sandbox

So, I'm trying to use the Plugins package to dynamically load a haskell function from a source file. The source file depends on a package foo with module Foo.Bar. I'm running my project in a Cabal sandbox, where I have foo installed. Both my main program, and the module I'm loading with plugins, depend on foo. I always get one of the following two errors:
When I have foo installed in ~/.cabal, I get the error:
GHCi runtime linker: fatal error: I found a duplicate definition for symbol
aizmvszmaizmlibzm0zi1_FooziBar_zdfTypeableBazzuds2_closure
whilst processing object file
/home/joey/.cabal/lib/foo-0.1/ghc-7.6.3/HSfoo-0.1.o
This could be caused by:
* Loading two different object files which export the same symbol
* Specifying the same object file twice on the GHCi command line
* An incorrect `package.conf' entry, causing some object to be
loaded twice.
GHCi cannot safely continue in this situation. Exiting now. Sorry.
When I don't have it installed in ~/.cabal, I get a standard "module not found" error. And when I don't have it installed in my sandbox, I get the same module not found error trying to compile my main program code.
The plugins documentation is scarce at best. Any thoughts on how to solve this?
I got this working by using System.Plugins.Make to actually do the compliation, instead of relying on pre-existing object files. Not a complete solution, doesn't explain the problem, but it works for me for now.

gstreamer plugin development issue, gst-inspect says: undefined symbol: gst_video_format_new_caps

I need to develop a gstreamer source element, so after running a script to generate plug-in sources and adding some basic boilerplate code, I got my plug-in to build, however when trying to load it from gst-inspect tool, I get:
(gst-plugin-scanner:10260): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-0.10/libgstbcmdec.so': /usr/lib64/gstreamer-0.10/libgstbcmdec.so: undefined symbol: gst_video_format_new_caps
I found that this symbol should be in gstreamer-plugins-base so I double-checked that its already installed. Also added -lgstvideo-0.10 to the Makefile.am (so added to GST_LIBS) however this doesnt help. Any ideas what I am doing wrong?
I am working on Fedora core 14, 64 bit, and have the latest gstreamer-* packages (used yum).
What is your exact Makefile.am? Is it looking like this?
libgstbcmdec_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
...

Resources