webrtc/examples/androidapp
Magnus Jedvert b93d030b55 Android: Update RecordedAudioToFileController
This CL refactors the way RecordedAudioToFileController is connected to
AudioRecord. Instead of allowing to dynamically set and update the
AudioSamplesCallback, it's set once at start time and then stopping is
implemented in RecordedAudioToFileController by simply ignoring calls to
onWebRtcAudioRecordSamplesReady.

The reason for this CL is to reduce the amount of methods we need to
add to the future AudioDeviceModule interface. The more functionality
we can move to creation time in the ctor, the less methods we need to
have in the interface.

Bug: webrtc:7452
Change-Id: I462df275d8579c848e1d2c86cbd8e881da89cbf3
Reviewed-on: https://webrtc-review.googlesource.com/64988
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22653}
2018-03-28 15:32:26 +00:00
..
res Add setting to switch between new and legacy AudioDeviceModule in AppRTC 2018-03-26 14:57:00 +00:00
src/org/appspot/apprtc Android: Update RecordedAudioToFileController 2018-03-28 15:32:26 +00:00
third_party/autobanh Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
AndroidManifest.xml Revert "Target SDK level 27 in AppRTCMobile." 2018-01-30 08:34:31 +00:00
ant.properties Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
build.xml Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
OWNERS Add phoglund@ to various OWNERS and remove kjellander@ 2017-10-19 09:21:12 +00:00
project.properties Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
README Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
start_loopback_stubbed_camera_saved_video_out.py Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00

This directory contains an example Android client for https://appr.tc

Prerequisites:
- "Getting the code", "Compiling", and "Using the Bundled Android SDK/NDK"
  on http://www.webrtc.org/native-code/android

Example of building & using the app:

cd <path/to/webrtc>/src
ninja -C out/Default AppRTCMobile
adb install -r out/Default/apks/AppRTCMobile.apk

In desktop chrome, navigate to https://appr.tc and note the r=<NNN> room
this redirects to or navigate directly to https://appr.tc/r/<NNN> with
your own room number. Launch AppRTC on the device and add same <NNN> into the room name list.

You can also run application from a command line to connect to the first room in a list:
adb shell am start -n org.appspot.apprtc/.ConnectActivity -a android.intent.action.VIEW
This should result in the app launching on Android and connecting to the 3-dot-apprtc
page displayed in the desktop browser.
To run loopback test execute following command:
adb shell am start -n org.appspot.apprtc/.ConnectActivity -a android.intent.action.VIEW --ez "org.appspot.apprtc.LOOPBACK" true