Unfortunately, WebRTC build process is quite tedious and require special building tools on Linux host. So I decided to pre-build WebRTC libraries to share with those who have no patience to build themself (see details of building process below).
You can get WebRTCDemo and AppRTCDemo source code and its ARM-build binary libraries from GitHub now. Those projects are ready to be modified and recompiled in any environment with appropriate Android SDK set up ( compilation required platform >21 , e.t. Android 5.0 LOLLIPOP, but application can run on Android 4.x as well). I’ll try to keep up with WebRTC development and try re-build those projects at least once a month.
First of all you need Ubuntu host – I setup a naked distribution of Ubuntu 14.04 LTS on top of VirtualBox. Installation process itself is straight forward one, but install, don’t forget to instal VirtualBox additions (see good instructions) – makes your life much simpler.
And then execute:
# assuming we are starting from "virgin" Ubuntu installation
sudo apt-get install git
sudo apt-get install g++
sudo apt-get install subversion
sudo apt-get install git-svn
sudo apt-get install openjdk-7-jdk
sudo apt-get install ant
sudo apt-get install lib32stdc++6 lib32z1
# get google build tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
# we'll need Java
# now we are setting our target for compilation
# New home for WebCRT
# Time to pull sources ( including all dependencies derived from chromium project)
# will take quite a time
# Now time to build
# setup Android cross compiler build environment
export GYP_DEFINES="build_with_chromium=0 $GYP_DEFINES"
export GYP_DEFINES="build_with_libjingle=1 $GYP_DEFINES"
export GYP_DEFINES="libjingle_java=1 $GYP_DEFINES"
# send WEBRTC_LOGGING to Android's logcat
export GYP_DEFINES="enable_tracing=1 $GYP_DEFINES"
# Generate .ninja files
# and now is an actual build....
# Build AppRTCDemo application – demonstrates interoperability of native Android
# source code / project root : src/talk/examples/android/
# resulting APK : src/out/Debug/AppRTCDemo-debug.apk
ninja -C out/Debug AppRTCDemo
# Build WebRTCDemo application – exchange video+audio between two
# android clients.
# source code / project root : src/webrtc/examples/android/media_demo/
# resulting APK : src/out/Debug/WebRTCDemo-debug.apk
ninja -C out/Debug WebRTCDemo