Cine.io Peer Android SDK

Cine.io Peer Android Sdk

License

License

MIT
GroupId

GroupId

io.cine
ArtifactId

ArtifactId

cineio-peer-android-sdk
Last Version

Last Version

0.0.6
Release Date

Release Date

Type

Type

aar
Description

Description

Cine.io Peer Android SDK
Cine.io Peer Android Sdk
Source Code Management

Source Code Management

https://github.com/cine-io/cineio-peer-android

Download cineio-peer-android-sdk

How to add to project

<!-- https://jarcasting.com/artifacts/io.cine/cineio-peer-android-sdk/ -->
<dependency>
    <groupId>io.cine</groupId>
    <artifactId>cineio-peer-android-sdk</artifactId>
    <version>0.0.6</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/io.cine/cineio-peer-android-sdk/
implementation 'io.cine:cineio-peer-android-sdk:0.0.6'
// https://jarcasting.com/artifacts/io.cine/cineio-peer-android-sdk/
implementation ("io.cine:cineio-peer-android-sdk:0.0.6")
'io.cine:cineio-peer-android-sdk:aar:0.0.6'
<dependency org="io.cine" name="cineio-peer-android-sdk" rev="0.0.6">
  <artifact name="cineio-peer-android-sdk" type="aar" />
</dependency>
@Grapes(
@Grab(group='io.cine', module='cineio-peer-android-sdk', version='0.0.6')
)
libraryDependencies += "io.cine" % "cineio-peer-android-sdk" % "0.0.6"
[io.cine/cineio-peer-android-sdk "0.0.6"]

Dependencies

compile (3)

Group / Artifact Type Version
io.cine : primus jar 0.0.4
commons-codec : commons-codec jar 1.5
com.google.android.gms » play-services jar [4.1,)

Project Modules

There are no modules declared in this project.

Android peer client

Build Status

The android library for cine.io peer.

Installation

Add the following to your build.gradle.

dependencies {
  compile 'io.cine:cineio-peer-android-sdk:0.0.6'
}

Ensure Maven central is included in your build.gradle. This should happen by default when building a project with Google's recommended Android IDE, Android Studio.

apply plugin: 'android'
buildscript {
  repositories {
    mavenCentral()
  }
}
repositories {
  mavenCentral()
}

Download cineio-peer-android-sdk to your application with ./gradlew build.

Example App

The best way to see it in action is to run the example app locally. There's some trickiness around rendering the peer videos. You can find the example Activity here: https://github.com/cine-io/cineio-peer-android/blob/master/CineIOPeerExampleApp/src/main/java/io/cine/cineiopeerclientexampleapp/exampleapp/MainActivity.java

Running Locally

  1. Clone to your local machine:
git clone git@github.com:cine-io/cineio-peer-android.git
cd cineio-peer-android
  • Register for a public and secret key at cine.io
  • Open Android Studio
    • Using the Quick Start panel:
      1. click "Import project (Eclipse ADT, Gradle, etc.)"
      • Navigate to the project on your file system. It should show the Android Studio logo.
    • Using Menu:
      1. Click "File:"
      • Click "Import Project…"
      • Navigate to the project on your file system. It should show the Android Studio logo.
  • Update PUBLIC_KEY in MainActivity
  • Click Run CineIOPeerExampleApp. Gradle should automatically download the dependencies and build your project.
  • Select your device from the "Choose Device" panel. Click "OK"
  • The app automatically connects to cine.io, starts the camera, and puts you in a room called example.

Usage

Initialization

import io.cine.peerclient.CinePeerClient;

// Some other potential imports:
// import java.util.ArrayList;
// import org.webrtc.MediaStream;
public class MainActivity extends Activity implements CinePeerCallback {
    CinePeerClient cinePeerClient;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //initialize the client
        String PUBLIC_KEY = "YOUR_PUBLIC_KEY";
        CinePeerClientConfig config = new CinePeerClientConfig(PUBLIC_KEY, this);
        config.setVideo(true);
        config.setAudio(true);
        //config.setSecretKey(CINEIO_SECRET_KEY); //optional
        cinePeerClient = CinePeerClient.init(config);

        //initialize the view
        CinePeerView vsv = cinePeerClient.createView();
        Runnable eglContextReadyCallback = null;
        VideoRendererGui.setView(vsv, eglContextReadyCallback);
    }
}
io.cine

cine.io

Versions

Version
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1