henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | This directory contains an example Android client for http://apprtc.appspot.com |
| 2 | |
| 3 | Prerequisites: |
fischman@webrtc.org | 43a1395 | 2014-05-28 17:29:09 +0000 | [diff] [blame] | 4 | - "Android Specific Steps" on http://www.webrtc.org/reference/getting-started |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 5 | - 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.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 7 | 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 | |
| 15 | Example of building & using the app: |
| 16 | |
| 17 | cd <path/to/libjingle>/trunk |
| 18 | ninja -C out/Debug AppRTCDemo |
| 19 | adb install -r out/Debug/AppRTCDemo-debug.apk |
| 20 | |
| 21 | In desktop chrome, navigate to http://apprtc.appspot.com and note the r=<NNN> room |
| 22 | this redirects to. Launch AppRTC on the device and enter the same <NNN> into |
| 23 | the dialog box. |
| 24 | |
| 25 | Alternatively, replace the <NNN> from the desktop chrome into the following |
| 26 | command: |
fischman@webrtc.org | c5d506a | 2014-02-14 17:55:13 +0000 | [diff] [blame] | 27 | adb shell am start -n org.appspot.apprtc/.AppRTCDemoActivity -a android.intent.action.VIEW -d '"https://apprtc.appspot.com/?r=<NNN>"' |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 28 | This should result in the app launching on Android and connecting to the apprtc |
| 29 | page displayed in the desktop browser. |
| 30 | |
| 31 | Yet another way to is to send the apprtc room URL to the Android device (e.g. using |
| 32 | https://chrome.google.com/webstore/detail/google-chrome-to-phone-ex/oadboiipflhobonjjffjbfekfjcgkhco) |
| 33 | and choose to open the URL with the AppRTCDemo app. |