blob: ee47e1f6727c7902c0588fe32c7c887a841cd801 [file] [log] [blame]
glaznev@webrtc.org4b407aa2014-12-04 22:42:59 +00001This directory contains an example Android client for https://3-dot-apprtc.appspot.com
henrike@webrtc.org28e20752013-07-10 00:45:36 +00002
3Prerequisites:
fischman@webrtc.org43a13952014-05-28 17:29:09 +00004- "Android Specific Steps" on http://www.webrtc.org/reference/getting-started
henrike@webrtc.org28e20752013-07-10 00:45:36 +00005- Set up webrtc-related GYP variables:
6 export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_java=1 $GYP_DEFINES"
henrike@webrtc.org28e20752013-07-10 00:45:36 +00007 To cause WEBRTC_LOGGING to emit to Android's logcat, add enable_tracing=1 to
8 the $GYP_DEFINES above.
9- When targeting both desktop & android, make sure to use a different output_dir
10 value in $GYP_GENERATOR_FLAGS or you'll likely end up with mismatched ARM &
11 x86 output artifacts. If you use an output_dir other than out/ make sure to
12 modify the command-lines below appropriately.
13- Finally, run "gclient runhooks" to generate Android-targeting .ninja files.
14
15Example of building & using the app:
16
glaznev@webrtc.org8390c272015-01-02 19:51:12 +000017cd <path/to/webrtc>/src
henrike@webrtc.org28e20752013-07-10 00:45:36 +000018ninja -C out/Debug AppRTCDemo
19adb install -r out/Debug/AppRTCDemo-debug.apk
20
jiayl@webrtc.org16a05dd2014-12-18 20:12:03 +000021In desktop chrome, navigate to https://apprtc.appspot.com and note the r=<NNN> room
22this redirects to or navigate directly to https://apprtc.appspot.com/r/<NNN> with
glaznev@webrtc.org4b407aa2014-12-04 22:42:59 +000023your own room number. Launch AppRTC on the device and add same <NNN> into the room name list.
henrike@webrtc.org28e20752013-07-10 00:45:36 +000024
glaznev@webrtc.org4b407aa2014-12-04 22:42:59 +000025You can also run application from a command line to connect to the first room in a list:
26adb shell am start -n org.appspot.apprtc/.ConnectActivity -a android.intent.action.VIEW
27This should result in the app launching on Android and connecting to the 3-dot-apprtc
henrike@webrtc.org28e20752013-07-10 00:45:36 +000028page displayed in the desktop browser.
glaznev@webrtc.org4b407aa2014-12-04 22:42:59 +000029To run loopback test execute following command:
30adb shell am start -n org.appspot.apprtc/.ConnectActivity -a android.intent.action.VIEW --ez "org.appspot.apprtc.LOOPBACK" true
henrike@webrtc.org28e20752013-07-10 00:45:36 +000031