EcoCDN P2P WebRTC
  • Introduction
  • HLS INTEGRATION
  • HTML5 Players
  • VideoJS Player
  • Android Integration
    • Environment Configuration
    • Import Android-SDK
    • Quick Start
    • Advanced Usage
    • API & Config
  • IOS INTEGRATION
    • Requirements
    • Project Setup
    • Integration
    • Advanced Usage
Powered by GitBook
On this page

Was this helpful?

  1. Android Integration

Import Android-SDK

PreviousEnvironment ConfigurationNextQuick Start

Last updated 3 years ago

Was this helpful?

Download SDK

Download the and then copy it to app/libs .

https://ecocdn.net/android_sdk/p2p.jar
https://ecocdn.net/android_sdk/webrtc.aar

Modify build.gradle

Add the following code to your application's build.gradle app/build.gradle :

android {
    repositories {
        flatDir {
            dirs 'libs'
        }
    }
}

Besides add new dependencies in app/build.gradle as shown below:

dependencies {
    implementation 'com.alibaba:fastjson:1.2.58'
    implementation 'org.java-websocket:Java-WebSocket:1.5.1'   // Need latest version to avoid crash
    implementation 'com.orhanobut:logger:2.2.0'
    implementation 'com.squareup.okhttp3:okhttp:3.12.13'       // Or higher OkHttp version
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    compile(name:'webrtc', ext:'aar')
}
Android-SDK
WebRTC library