jansson | dccbc5e | 2016-04-15 07:16:12 -0700 | [diff] [blame^] | 1 | This directory contains an example Android client for https://appr.tc |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 2 | |
| 3 | Prerequisites: |
glaznev@webrtc.org | e815290 | 2015-03-23 22:35:14 +0000 | [diff] [blame] | 4 | - "Getting the code" on http://www.webrtc.org/native-code/android |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 5 | - Set up webrtc-related GYP variables: |
kjellander@webrtc.org | 2db1dbb | 2016-03-11 21:34:24 -0800 | [diff] [blame] | 6 | export GYP_DEFINES="OS=android $GYP_DEFINES" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 7 | - When targeting both desktop & android, make sure to use a different output_dir |
glaznev@webrtc.org | e815290 | 2015-03-23 22:35:14 +0000 | [diff] [blame] | 8 | 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.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 13 | - Finally, run "gclient runhooks" to generate Android-targeting .ninja files. |
| 14 | |
| 15 | Example of building & using the app: |
| 16 | |
glaznev@webrtc.org | 8390c27 | 2015-01-02 19:51:12 +0000 | [diff] [blame] | 17 | cd <path/to/webrtc>/src |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 18 | ninja -C out/Debug AppRTCDemo |
glaznev@webrtc.org | e815290 | 2015-03-23 22:35:14 +0000 | [diff] [blame] | 19 | adb install -r out/Debug/apks/AppRTCDemo.apk |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 20 | |
jansson | dccbc5e | 2016-04-15 07:16:12 -0700 | [diff] [blame^] | 21 | In desktop chrome, navigate to https://appr.tc and note the r=<NNN> room |
| 22 | this redirects to or navigate directly to https://appr.tc/r/<NNN> with |
glaznev@webrtc.org | 4b407aa | 2014-12-04 22:42:59 +0000 | [diff] [blame] | 23 | your own room number. Launch AppRTC on the device and add same <NNN> into the room name list. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 24 | |
glaznev@webrtc.org | 4b407aa | 2014-12-04 22:42:59 +0000 | [diff] [blame] | 25 | You can also run application from a command line to connect to the first room in a list: |
| 26 | adb shell am start -n org.appspot.apprtc/.ConnectActivity -a android.intent.action.VIEW |
| 27 | This should result in the app launching on Android and connecting to the 3-dot-apprtc |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 28 | page displayed in the desktop browser. |
glaznev@webrtc.org | 4b407aa | 2014-12-04 22:42:59 +0000 | [diff] [blame] | 29 | To run loopback test execute following command: |
| 30 | adb shell am start -n org.appspot.apprtc/.ConnectActivity -a android.intent.action.VIEW --ez "org.appspot.apprtc.LOOPBACK" true |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 31 | |