Working with Android SDK

Resources

 

Use Android SDK to develop mobile applications for streaming video and calls.

 

Download WCS Android SDK as .aar file

http://flashphoner.com/downloads/builds/flashphoner_client/wcs-android-sdk/aar

 

Download full WCS Android SDK build including examples and API documentation

http://flashphoner.com/downloads/builds/flashphoner_client/wcs-android-sdk

 

Read API documentation online

http://flashphoner.com/docs/api/WCS5/client/android-sdk/latest

 

Download the source code of the examples

https://github.com/flashphoner/wcs-android-sdk-samples

 

The source code of the examples is located at Github and is used to comment the examples in the present documentation.

For instance, this link line 34 refers to the thirty fourth line in the TwoPlayersActivity.java class of the 2players example, the revision with the hash of 4ed4c6d77.

 

To test compiled applications, download The full build with the examples And install the .apk file to your Android device.

 

Preparing examples for building

 

If you have some experience in developing Android apps, you can simply download the aar-library and link it to the project manually, then configure building.

 

Below is how to do this automatically using the export.sh script:

 

1. Download the examples

git clone git@github.com:flashphoner/wcs-android-sdk-samples.git

 

2. Download the aar library and put it to the 'export' folder

 

Example:

 

wget http://flashphoner.com/downloads/builds/flashphoner_client/wcs-android-sdk/aar/wcs-android-sdk-1.0.1.2.aar

cp wcs-android-sdk-1.0.1.2.aar export

 

3. Open the 'export' folder and execute the export.sh script that will prepare configs for further building. The result is placed into the 'output' folder.

 

cd export

./export.sh wcs-android-sdk-1.0.1.2.aar

 

4. Edit the local.properties file and specify paths to Android SDK and NDK

 

Example:

 

ndk.dir=/opt/android-ndk-r12b

sdk.dir=/opt/android-sdk-linux

 

Building examples with Gradle

 

Prepare examples for building, then go to the 'output' folder and start building:

 

cd output

gradle build

 

Building examples in Android Studio

 

Prepare examples for building and put them to the 'output' folder, then rename it to 'wcs_android_sdk_samples', for instance.

 

1. Install the following programs:

- Android Studio и Android SDK

- Android NDK

 

2. Open the project from the 'output' folder in Android Studio

 

android-studio

 

4. Add Gradle run configuration to the Run / Debug Configurations menu

 

run-configuration-Gradle

 

5. To configure the run, specify the build.gradle file, the name of the build and set the purpose to: build

 

select-gradle-file

 

6. Run building of examples.

 

build-button

 

The building result is .apk files located in the corresponding folders: 2players/build, click-to-call/build, and so on.

The Android SDK file is located in the following path in the project: libs/wcs-android-sdk-1.0.1.2.aar