Android SDK for eyeson video service incl. demo app

Related tags

SDK android-sdk
Overview

eyeson Android SDK

Android SDK for eyeson video service incl. demo app

Prerequisites

A webservice to host and maintain eyeson meetings is required. The eyeson Android SDK acts as communication client for a valid meeting room accessKey or guestToken. The respective keys can be obtained in exchange for an API key. See API documentation at eyeson developers.

Installation

Add JitPack to your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Add the dependency to your app-level build.gradle. Latest version:

dependencies {
	implementation 'com.github.eyeson-team:android-sdk:VERSION'
}

Permissions

The eyeson Android SDK uses the following permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

Add them to you manifest and make sure that you have requested the CAMERA and RECORD_AUDIO runtime permission before joining a meeting. See the Android documentation on how to request them.

Usage

Create a meeting instance. For eventListener see Events

val eyesonMeeting = EyesonMeeting(eventListener, application)

Video views

Create and bind video views. The binding of the views can be done before or after joining the meeting.
Note that video will still be sent, event if the views are not initialized.

<org.webrtc.SurfaceViewRenderer
    android:id="@+id/remoteVideo"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

<org.webrtc.SurfaceViewRenderer
    android:id="@+id/localVideo"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

eglBaseContext can be obtained through the eyesonMeeting instance

binding.localVideo.init(eglBaseContext, null)
binding.localVideo.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_BALANCED)
binding.localVideo.setEnableHardwareScaler(true)

binding.remoteVideo.init(eglBaseContext, null)
binding.remoteVideo.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_BALANCED)
binding.remoteVideo.setEnableHardwareScaler(true)

Views must be released after the meeting has ended or terminated.

binding.localVideo.release()
binding.remoteVideo.release()

Join meeting

Can either be done via accessKey or guestToken

eyesonMeeting.join(
    accessKey = accessKey,
    frontCamera = true,
    audiOnly = false,
    local = local,
    remote = remote,
    microphoneEnabledOnStart = true,
    videoEnabledOnStart = true
)           
eyesonMeeting.joinAsGuest(
    guestToken = guestToken,
    name = name,
    id = null, // optional 
    avatar = null, // optional URL
    frontCamera = true,
    audiOnly = false,
    local = local,
    remote = remote,
    microphoneEnabledOnStart = true,
    videoEnabledOnStart = true
)            

Instance methods

// Leave the meeting. Doesn't end it for other participants 
fun leave() // Views still need to be released

// Set video targets
fun setLocalVideoTarget(target: VideoSink?)
fun setRemoteVideoTarget(target: VideoSink?)

// Enable/Disable outgoing video
fun setVideoEnabled(enable: Boolean)

// is local video enabled
fun isVideoEnabled(): Boolean

fun switchCamera()

fun isFrontCamera(): Boolean?

// send mute command to other participants
fun sendMuteOthers()

fun setMicrophoneEnabled(enable: Boolean)

// send chat message to all participants (including self)
fun sendChatMessage(message: String)

fun getEglContext(): EglBase.Context?

Events

abstract class EyesonEventListener {
    open fun onPermissionsNeeded(neededPermissions: List<NeededPermissions>) {}
    open fun onMeetingJoining(
        name: String,
        startedAt: Date,
        user: UserInfo,
        locked: Boolean,
        guestToken: String,
        guestLink: String,
        activeRecording: Recording?,
        activeBroadcasts: BroadcastUpdate?,
        snapshots: SnapshotUpdate?
    ) {
    }

    open fun onMeetingJoined() {}
    open fun onMeetingJoinFailed(callRejectionReason: CallRejectionReason) {}
    open fun onMeetingTerminated(callTerminationReason: CallTerminationReason) {}
    open fun onMeetingLocked(locked: Boolean) {}

    open fun onStreamingModeChanged(p2p: Boolean) {}
    open fun onVideoSourceUpdate(visibleUsers: List<UserInfo>, presenter: UserInfo?) {}
    open fun onAudioMutedBy(user: UserInfo) {}
    open fun onMediaPlayback(playing: List<Playback>) {}
    open fun onBroadcastUpdate(activeBroadcasts: BroadcastUpdate) {}
    open fun onRecordingUpdate(recording: Recording) {}
    open fun onSnapshotUpdate(snapshots: SnapshotUpdate) {}


    open fun onUserJoinedMeeting(users: List<UserInfo>) {}
    open fun onUserLeftMeeting(users: List<UserInfo>) {}
    open fun onUserListUpdate(users: List<UserInfo>) {}
    open fun onVoiceActivity(user: UserInfo, active: Boolean){}

    open fun onChatMessageReceived(user: UserInfo, message: String, timestamp: Date) {}

    open fun onCameraSwitchDone(isFrontCamera: Boolean) {}
    open fun onCameraSwitchError(error: String) {}
}
You might also like...
How to Integrate SAWO SDK to an Android app

How to Integrate SAWO SDK to an Android app Add following line to root build.gradle repositories block maven { url 'https://jitpack.io' } Add this to

A sample project of implementing Liveness Detection and Identity OCR on Android app using Kredibel Vision SDK
A sample project of implementing Liveness Detection and Identity OCR on Android app using Kredibel Vision SDK

Vision Sample (Android) A sample project of implementing Liveness Detection and Identity OCR on Android app using Kredibel Vision SDK. You can checkou

Free forever Marketing SDK with a dashboard for in-app SplashScreen banners with built-in analytics
Free forever Marketing SDK with a dashboard for in-app SplashScreen banners with built-in analytics

AdaptivePlus Android SDK AdaptivePlus is the control center for marketing campaigns in mobile applications Requirements minSdkVersion 16 Examples prov

Its measurement app made using kotlin with sceneform sdk by google

ARCORE MEASUREMENT This app is build using sceneform sdk for android using kotlin language It helps you measure the distance between multiple points i

this is the demo of billing new library v3

Billing library v3 demo android This is the demo of billing new library v3 for android native IMPORTANT 1- you must have login to google play store to

AWS SDK for Android. For more information, see our web site:

AWS SDK for Android For new projects, we recommend interacting with AWS using the Amplify Framework. The AWS SDK for Android is a collection of low-le

Countly Product Analytics Android SDK
Countly Product Analytics Android SDK

Countly Android SDK We're hiring: Countly is looking for Android SDK developers, full stack devs, devops and growth hackers (remote work). Click this

Android Real Time Chat & Messaging SDK
Android Real Time Chat & Messaging SDK

Android Chat SDK Overview Applozic brings real-time engagement with chat, video, and voice to your web, mobile, and conversational apps. We power emer

Evernote SDK for Android

Evernote SDK for Android version 2.0.0-RC4 Evernote API version 1.25 Overview This SDK wraps the Evernote Cloud API and provides OAuth authentication

Comments
  • How to access local video?

    How to access local video?

    Hello dev team,

    I'm very interested in your work, I tent to use eyes on SDK for my demo app in the thesis. I had to get a local video of a user in meeting to send to server-side after that analysis and get emotion detection. But as my understanding, Only one thread can access media stream from camera. So my question is: Is there any way to get video data from Eyeson's meeting surface view?

    Best regards,

    Son Nguyen

    opened by sonnguyen1996 6
Releases(1.0.3)
Owner
eyeson
eyeson
A demo of Rongcloud uniapp sdk integration for compiling debug-apk in Android Studio

Rongcloud-uniapp-sdk-demo A demo of Rongcloud uniapp sdk integration for compiling debug-apk in Android Studio 这是一个为了给uniapp在Android平台打出debug-apk的demo

Zongkui Guo 1 Oct 13, 2021
Sdk-android - SnapOdds Android SDK

Documentation For the full API documentation go to https://snapodds.github.io/sd

Snapodds 0 Jan 30, 2022
Segmenkt - The SegmenKT Kotlin SDK is a Kotlin-first SDK for Segment

SegmenKT Kotlin SDK The SegmenKT Kotlin SDK is a Kotlin-first SDK for Segment. I

UNiDAYS 0 Nov 25, 2022
Frogo SDK - SDK Core for Easy Development

SDK for anything your problem to make easier developing android apps

Frogobox 10 Dec 15, 2022
HubSpot Kotlin SDK 🧺 Implementation of HubSpot API for Java/Kotlin in tiny SDK

HubSpot Kotlin SDK ?? Implementation of HubSpot API for Java/Kotlin in tiny SDK

BOOM 3 Oct 27, 2022
Small library that wraps Google Play Service API in brilliant RxJava Observables reducing boilerplate to minimum.

ReactiveLocation library for Android Small library that wraps Google Play Services API in brilliant RxJava Observables reducing boilerplate to minimum

Michał Charmas 2.1k Dec 4, 2022
Powerful custom Android Camera with granular control over the video quality and filesize, restricting recordings to landscape only.

LandscapeVideoCamera Highly flexible Android Camera which offers granular control over the video quality and filesize, while restricting recordings to

Jeroen Mols 1.2k Dec 29, 2022
Powerful custom Android Camera with granular control over the video quality and filesize, restricting recordings to landscape only.

LandscapeVideoCamera Highly flexible Android Camera which offers granular control over the video quality and filesize, while restricting recordings to

Jeroen Mols 1.2k Nov 22, 2022
This App is sending Face capture data over network, built around the latest Android Arcore SDK.

AndroidArcoreFacesStreaming From any Android phone ArCore compatible, using this app will send over TCP 5680 bytes messages: The first 5616 bytes is a

Maxime Dupart 30 Nov 16, 2022