blob: 856879e4d778e32b45e7f6708dd62f17c5b82cc2 [file] [log] [blame]
glaznev@webrtc.orge8152902015-03-23 22:35:14 +00001This directory contains an example Android client for https://apprtc.appspot.com
henrike@webrtc.org28e20752013-07-10 00:45:36 +00002
3Prerequisites:
glaznev@webrtc.orge8152902015-03-23 22:35:14 +00004- "Getting the code" on http://www.webrtc.org/native-code/android
henrike@webrtc.org28e20752013-07-10 00:45:36 +00005- Set up webrtc-related GYP variables:
kjellander@webrtc.org2db1dbb2016-03-11 21:34:24 -08006 export GYP_DEFINES="OS=android $GYP_DEFINES"
henrike@webrtc.org28e20752013-07-10 00:45:36 +00007- When targeting both desktop & android, make sure to use a different output_dir
glaznev@webrtc.orge8152902015-03-23 22:35:14 +00008 value in $GYP_GENERATOR_FLAGS - for example
9 export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_android"
10 or you'll likely end up with mismatched ARM & x86 output artifacts.
11 If you use an output_dir other than out/ make sure to modify the command-lines
12 below appropriately.
henrike@webrtc.org28e20752013-07-10 00:45:36 +000013- 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
glaznev@webrtc.orge8152902015-03-23 22:35:14 +000019adb install -r out/Debug/apks/AppRTCDemo.apk
henrike@webrtc.org28e20752013-07-10 00:45:36 +000020
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