There are a couple of web pages with instructions out there about how to build the library for Android, but none of them seem complete.
This is where this post comes in.
The steps to build libjingle for Android would be these:
- Install depot tools - http://dev.chromium.org/developers/how-tos/install-depot-tools
- Install the prerequisite software - http://www.webrtc.org/native-code/development/prerequisite-sw
- Run the following commands to get the sources:
- Run the following commands to configure the build environment:
- Start the build for libjingle_peerconnection.so
mkdir webrtc-checkout
cd webrtc-checkout
fetch webrtc
echo "target_os = ['android', 'unix']" >> .gclient
cd src
source ./build/android/envsetup.sh
export GYP_DEFINES="$GYP_DEFINES build_with_libjingle=1 build_with_chromium=0 libjingle_java=1 OS=android"
./build/install-android-sdks.sh
gclient runhooks --force
ninja -C out/Debug libjingle_peerconnection_so
To try out libjingle on Android you can compile the AppRTCDemo application:
ninja -C out/Debug AppRTCDemo
A working video call should look like this:
References:
- http://andrii.sergiienko.me/?go=all/building-webrtc-demo-for-android/
- https://andrewjprokop.wordpress.com/2014/08/26/writing-your-first-webrtc-appliation-part-three/
No comments:
Post a Comment