├── kurento-room-client-android ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ └── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── fi │ │ │ └── vtt │ │ │ └── nubomedia │ │ │ └── kurentoroomclientandroid │ │ │ ├── RoomNotification.java │ │ │ ├── RoomListener.java │ │ │ ├── RoomError.java │ │ │ ├── RoomResponse.java │ │ │ ├── KurentoAPI.java │ │ │ └── KurentoRoomAPI.java │ ├── test │ │ └── java │ │ │ └── fi │ │ │ └── vtt │ │ │ └── nubomedia │ │ │ └── kurentoroomclientandroid │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── fi │ │ └── vtt │ │ └── nubomedia │ │ └── kurentoroomclientandroid │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── javadoc ├── package-list ├── script.js ├── allclasses-noframe.html ├── allclasses-frame.html ├── fi │ └── vtt │ │ └── nubomedia │ │ └── kurentoroomclientandroid │ │ ├── package-frame.html │ │ ├── package-tree.html │ │ ├── ApplicationTest.html │ │ ├── package-summary.html │ │ ├── RoomNotification.html │ │ ├── RoomError.html │ │ ├── RoomResponse.html │ │ ├── KurentoRoomAPI.Method.html │ │ └── KurentoAPI.html ├── index.html ├── deprecated-list.html ├── overview-tree.html ├── constant-values.html ├── help-doc.html └── stylesheet.css ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /kurento-room-client-android/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':kurento-room-client-android' 2 | -------------------------------------------------------------------------------- /javadoc/package-list: -------------------------------------------------------------------------------- 1 | fi.vtt.nubomedia.kurentoroomclientandroid 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nubomedia-vtt/kurento-room-client-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | _build 10 | .idea 11 | -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | nubomedia-kurento-room-client-android 3 | 4 | -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nubomedia-vtt/kurento-room-client-android/HEAD/kurento-room-client-android/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nubomedia-vtt/kurento-room-client-android/HEAD/kurento-room-client-android/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nubomedia-vtt/kurento-room-client-android/HEAD/kurento-room-client-android/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nubomedia-vtt/kurento-room-client-android/HEAD/kurento-room-client-android/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nubomedia-vtt/kurento-room-client-android/HEAD/kurento-room-client-android/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Aug 30 13:59:32 EEST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /kurento-room-client-android/src/test/java/fi/vtt/nubomedia/kurentoroomclientandroid/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package fi.vtt.nubomedia.kurentoroomclientandroid; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /kurento-room-client-android/src/androidTest/java/fi/vtt/nubomedia/kurentoroomclientandroid/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package fi.vtt.nubomedia.kurentoroomclientandroid; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /kurento-room-client-android/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Developer\android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /javadoc/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /javadoc/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /javadoc/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /javadoc/fi/vtt/nubomedia/kurentoroomclientandroid/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | fi.vtt.nubomedia.kurentoroomclientandroid 7 | 8 | 9 | 10 | 11 | 12 |

fi.vtt.nubomedia.kurentoroomclientandroid

13 |
14 |

Interfaces

15 | 18 |

Classes

19 | 26 |

Enums

27 | 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/java/fi/vtt/nubomedia/kurentoroomclientandroid/RoomNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 VTT (http://www.vtt.fi) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package fi.vtt.nubomedia.kurentoroomclientandroid; 19 | 20 | import java.util.Map; 21 | import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcNotification; 22 | 23 | /** 24 | * Room notification class 25 | */ 26 | public class RoomNotification { 27 | 28 | private String method = null; 29 | private Map params = null; 30 | 31 | public RoomNotification(JsonRpcNotification obj){ 32 | super(); 33 | this.method = obj.getMethod(); 34 | this.params = obj.getNamedParams(); 35 | } 36 | 37 | @SuppressWarnings("unused") 38 | public Map getParams() { 39 | return params; 40 | } 41 | 42 | @SuppressWarnings("unused") 43 | public Object getParam(String key){ 44 | return params.get(key); 45 | } 46 | 47 | @SuppressWarnings("unused") 48 | public String getMethod() { 49 | return method; 50 | } 51 | 52 | public String toString(){ 53 | return "RoomNotification: "+method+" - "+paramsToString(); 54 | } 55 | 56 | private String paramsToString(){ 57 | StringBuilder sb = new StringBuilder(); 58 | if(this.params!=null){ 59 | for (Map.Entry entry : params.entrySet()) { 60 | String key = entry.getKey(); 61 | Object value = entry.getValue(); 62 | sb.append(key).append("=").append(value.toString()).append(", "); 63 | } 64 | return sb.toString(); 65 | } else return null; 66 | } 67 | } -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/java/fi/vtt/nubomedia/kurentoroomclientandroid/RoomListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 VTT (http://www.vtt.fi) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package fi.vtt.nubomedia.kurentoroomclientandroid; 19 | 20 | /** 21 | * Interface class defining the KurentoRoomAPI room events 22 | */ 23 | public interface RoomListener { 24 | 25 | /** 26 | * Notification method names 27 | */ 28 | public static final String METHOD_PARTICIPANT_JOINED = "participantJoined"; 29 | public static final String METHOD_PARTICIPANT_PUBLISHED = "participantPublished"; 30 | public static final String METHOD_PARTICIPANT_UNPUBLISHED = "participantUnpublished"; 31 | public static final String METHOD_ICE_CANDIDATE = "iceCandidate"; 32 | public static final String METHOD_PARTICIPANT_LEFT = "participantLeft"; 33 | public static final String METHOD_SEND_MESSAGE = "sendMessage"; 34 | public static final String METHOD_MEDIA_ERROR = "mediaError"; 35 | 36 | /** 37 | * Room has responded to a message 38 | * @param response The response object 39 | */ 40 | public void onRoomResponse(RoomResponse response); 41 | 42 | /** 43 | * The room has encountered an error 44 | * @param error The error object 45 | */ 46 | public void onRoomError(RoomError error); 47 | 48 | /** 49 | * The room has sent a notification 50 | * @param notification The notification object 51 | */ 52 | public void onRoomNotification(RoomNotification notification); 53 | 54 | /** 55 | * The connection to room is ready. 56 | */ 57 | public void onRoomConnected(); 58 | 59 | /** 60 | * The connection to room is lost or disconnected. 61 | */ 62 | public void onRoomDisconnected(); 63 | } 64 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/java/fi/vtt/nubomedia/kurentoroomclientandroid/RoomError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 VTT (http://www.vtt.fi) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package fi.vtt.nubomedia.kurentoroomclientandroid; 19 | 20 | import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcResponseError; 21 | 22 | /** 23 | * Room error class 24 | */ 25 | public class RoomError { 26 | 27 | /* Copied from https://github.com/Kurento/kurento-room/blob/master/kurento-room-sdk/src/main/java/org/kurento/room/exception/RoomException.java 28 | to avoid dependency to server for error checking 29 | */ 30 | public static enum Code { 31 | GENERIC_ERROR_CODE(999), 32 | 33 | TRANSPORT_ERROR_CODE(803), TRANSPORT_RESPONSE_ERROR_CODE(802), TRANSPORT_REQUEST_ERROR_CODE(801), 34 | 35 | MEDIA_MUTE_ERROR_CODE(307), MEDIA_NOT_A_WEB_ENDPOINT_ERROR_CODE(306), MEDIA_RTP_ENDPOINT_ERROR_CODE( 36 | 305), MEDIA_WEBRTC_ENDPOINT_ERROR_CODE(304), MEDIA_ENDPOINT_ERROR_CODE(303), MEDIA_SDP_ERROR_CODE( 37 | 302), MEDIA_GENERIC_ERROR_CODE(301), 38 | 39 | ROOM_CANNOT_BE_CREATED_ERROR_CODE(204), ROOM_CLOSED_ERROR_CODE(203), ROOM_NOT_FOUND_ERROR_CODE( 40 | 202), ROOM_GENERIC_ERROR_CODE(201), 41 | 42 | USER_NOT_STREAMING_ERROR_CODE(105), EXISTING_USER_IN_ROOM_ERROR_CODE(104), USER_CLOSED_ERROR_CODE( 43 | 103), USER_NOT_FOUND_ERROR_CODE(102), USER_GENERIC_ERROR_CODE(101); 44 | private int value; 45 | 46 | Code(int value) { 47 | this.value = value; 48 | } 49 | 50 | public int getValue() { 51 | return this.value; 52 | } 53 | } 54 | 55 | private int code = 0; 56 | private String data = null; 57 | 58 | public RoomError(JsonRpcResponseError error){ 59 | super(); 60 | if(error!=null) { 61 | this.code = error.getCode(); 62 | if(error.getData()!=null) { 63 | this.data = error.getData().toString(); 64 | } 65 | } 66 | } 67 | 68 | public int getCode() { 69 | return code; 70 | } 71 | 72 | public String getData() { 73 | return data; 74 | } 75 | 76 | public String toString(){ 77 | return "RoomError: "+code+" - "+data; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /javadoc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Generated Documentation (Untitled) 7 | 59 | 60 | 61 | 62 | 63 | 64 | <noscript> 65 | <div>JavaScript is disabled on your browser.</div> 66 | </noscript> 67 | <h2>Frame Alert</h2> 68 | <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="fi/vtt/nubomedia/kurentoroomclientandroid/package-summary.html">Non-frame version</a>.</p> 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /javadoc/deprecated-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Deprecated List 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 |
41 | 68 | 69 |
70 |

Deprecated API

71 |

Contents

72 |
73 | 74 |
75 | 76 | 77 | 78 | 79 | 80 | 81 | 88 |
89 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /kurento-room-client-android/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'com.github.dcendents.android-maven' 3 | apply plugin: "com.jfrog.bintray" 4 | 5 | version "1.1.1" 6 | 7 | android { 8 | compileSdkVersion 24 9 | buildToolsVersion "21.1.2" 10 | 11 | defaultConfig { 12 | minSdkVersion 15 13 | targetSdkVersion 24 14 | versionCode 9 15 | versionName "1.1.1" 16 | } 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | testCompile 'junit:junit:4.12' 27 | compile('fi.vtt.nubomedia:jsonrpc-ws-android:1.0.6@aar') { transitive=true } 28 | } 29 | 30 | def siteUrl = 'https://github.com/nubomedia-vtt/kurento-room-client-android' // Homepage URL of the library 31 | def gitUrl = 'https://github.com/nubomedia-vtt/kurento-room-client-android.git' // Git repository URL 32 | group = "fi.vtt.nubomedia" // Maven Group ID for the artifact 33 | 34 | install { 35 | repositories.mavenInstaller { 36 | // This generates POM.xml with proper parameters 37 | pom { 38 | project { 39 | packaging 'aar' 40 | name 'kurento-room-client-android' 41 | description = 'Android library for making kurento Room API calls' 42 | url siteUrl 43 | licenses { 44 | license { 45 | name 'Apache License 2.0' 46 | url 'https://www.apache.org/licenses/LICENSE-2.0.txt' 47 | } 48 | } 49 | developers { 50 | developer { 51 | id 'jpsjanne' 52 | name 'Janne Seppänen' 53 | email 'janne.seppanen@vtt.fi' 54 | } 55 | } 56 | scm { 57 | connection gitUrl 58 | developerConnection gitUrl 59 | url siteUrl 60 | 61 | } 62 | } 63 | } 64 | } 65 | } 66 | 67 | task sourcesJar(type: Jar) { 68 | from android.sourceSets.main.java.srcDirs 69 | classifier = 'sources' 70 | } 71 | 72 | task javadoc(type: Javadoc) { 73 | source = android.sourceSets.main.java.srcDirs 74 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) 75 | } 76 | 77 | task javadocJar(type: Jar, dependsOn: javadoc) { 78 | classifier = 'javadoc' 79 | from javadoc.destinationDir 80 | } 81 | artifacts { 82 | archives javadocJar 83 | archives sourcesJar 84 | } 85 | 86 | Properties properties = new Properties() 87 | properties.load(project.rootProject.file('local.properties').newDataInputStream()) 88 | 89 | // https://github.com/bintray/gradle-bintray-plugin 90 | bintray { 91 | user = properties.getProperty("bintray.user") 92 | key = properties.getProperty("bintray.apikey") 93 | 94 | configurations = ['archives'] 95 | pkg { 96 | repo = "maven" 97 | // it is the name that appears in bintray when logged 98 | name = "kurento-room-client-android" 99 | websiteUrl = siteUrl 100 | userOrg = 'nubomedia-vtt' 101 | vcsUrl = gitUrl 102 | licenses = ["BSD 3-Clause"] 103 | publish = true 104 | version { 105 | gpg { 106 | sign = true //Determines whether to GPG sign the files. The default is false 107 | passphrase = properties.getProperty("bintray.gpg.password") //Optional. The passphrase for GPG signing' 108 | } 109 | // mavenCentralSync { 110 | // sync = true //Optional (true by default). Determines whether to sync the version to Maven Central. 111 | // user = properties.getProperty("bintray.oss.user") //OSS user token 112 | // password = properties.getProperty("bintray.oss.password") //OSS user password 113 | // close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually. 114 | // } 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![License badge](https://img.shields.io/badge/license-Apache2-orange.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt) 2 | 3 | [![][NUBOMEDIA Logo]][NUBOMEDIA] 4 | 5 | Copyright © 2016 [VTT]. Licensed under [Apache 2.0 License]. 6 | 7 | kurento-room-client-android 8 | =========================== 9 | 10 | This repository contains Kurento Room API for Android. 11 | 12 | What is NUBOMEDIA 13 | ----------------- 14 | This project is part of [NUBOMEDIA], which is an open source cloud Platform as a 15 | Service (PaaS) which makes possible to integrate Real Time Communications (RTC) 16 | and multimedia through advanced media processing capabilities. The aim of 17 | NUBOMEDIA is to democratize multimedia technologies helping all developers to 18 | include advanced multimedia capabilities into their Web and smartphone 19 | applications in a simple, direct and fast manner. To accomplish that objective, 20 | NUBOMEDIA provides a set of APIs that try to abstract all the low level details 21 | of service deployment, management, and exploitation allowing applications to 22 | transparently scale and adapt to the required load while preserving QoS 23 | guarantees. 24 | 25 | Repository structure 26 | -------------------- 27 | This repository consists of an Android Studio library project with gradle build scripts. 28 | 29 | Documentation 30 | -------------------- 31 | Javadoc is available in [Github]. The more detailed Developers Guide and Installation Guide are available at 32 | [project documentation page]. 33 | 34 | Usage 35 | -------- 36 | You can import this project to your own Android Studio project via Maven (jCenter or Maven Central) by adding the following line to module's `build.gradle` file: 37 | ``` 38 | compile 'fi.vtt.nubomedia:kurento-room-client-android:(version-code)' 39 | ``` 40 | 41 | The latest version code of the artifact can be found on [maven artifact page]. 42 | 43 | Source 44 | ------ 45 | The source code is available in [Github] 46 | 47 | Licensing and distribution 48 | -------------------------- 49 | 50 | Licensed under the Apache License, Version 2.0 (the "License"); 51 | you may not use this file except in compliance with the License. 52 | You may obtain a copy of the License at 53 | 54 | [Apache 2.0 License] 55 | 56 | Unless required by applicable law or agreed to in writing, software 57 | distributed under the License is distributed on an "AS IS" BASIS, 58 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 59 | See the License for the specific language governing permissions and 60 | limitations under the License. 61 | 62 | Contribution policy 63 | ------------------- 64 | 65 | You can contribute to the Nubomedia community through bug-reports, bug-fixes, new 66 | code or new documentation. For contributing to the Nubomedia community, drop a 67 | post to the [Nubomedia Public Mailing List] providing full information about your 68 | contribution and its value. In your contributions, you must comply with the 69 | following guidelines 70 | 71 | * You must specify the specific contents of your contribution either through a 72 | detailed bug description, through a pull-request or through a patch. 73 | * You must specify the licensing restrictions of the code you contribute. 74 | * For newly created code to be incorporated in the Nubomedia code-base, you must 75 | accept Nubomedia to own the code copyright, so that its open source nature is 76 | guaranteed. 77 | * You must justify appropriately the need and value of your contribution. The 78 | Nubomedia project has no obligations in relation to accepting contributions 79 | from third parties. 80 | * The Nubomedia project leaders have the right of asking for further 81 | explanations, tests or validations of any code contributed to the community 82 | before it being incorporated into the Nubomedia code-base. You must be ready to 83 | addressing all these kind of concerns before having your code approved. 84 | 85 | Support 86 | ------- 87 | Support is provided through the [Nubomedia Public Mailing List] 88 | 89 | [NUBOMEDIA]: http://www.nubomedia.eu 90 | [VTT]: http://www.vtt.fi 91 | [NUBOMEDIA Logo]: http://www.nubomedia.eu/sites/default/files/nubomedia_logo-small.png 92 | [Apache 2.0 License]: https://www.apache.org/licenses/LICENSE-2.0.txt 93 | [Github]: https://github.com/nubomedia-vtt/kurento-room-client-android 94 | [Nubomedia Public Mailing List]: https://groups.google.com/forum/#!forum/nubomedia-dev 95 | [project documentation page]: http://kurento-room-client-android.readthedocs.org/en/latest/ 96 | [maven artifact page]: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22fi.vtt.nubomedia%22%20AND%20a%3A%22kurento-room-client-android%22 -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/java/fi/vtt/nubomedia/kurentoroomclientandroid/RoomResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 VTT (http://www.vtt.fi) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package fi.vtt.nubomedia.kurentoroomclientandroid; 19 | 20 | import net.minidev.json.JSONArray; 21 | import net.minidev.json.JSONObject; 22 | import java.util.HashMap; 23 | import java.util.List; 24 | import java.util.Map; 25 | import java.util.Set; 26 | import java.util.Vector; 27 | import fi.vtt.nubomedia.kurentoroomclientandroid.KurentoRoomAPI.Method; 28 | 29 | /** 30 | * Room response class 31 | */ 32 | public class RoomResponse { 33 | 34 | private int id = 0; 35 | private String sessionId = null; 36 | private List> values = null; 37 | private HashMap users = null; 38 | private String sdpAnswer = null; 39 | private Method method; 40 | 41 | public RoomResponse(String id, JSONObject obj){ 42 | this.id = Integer.valueOf(id); 43 | this.sessionId = this.getJSONObjectSessionId(obj); 44 | this.values = this.getJSONObjectValues(obj); 45 | } 46 | 47 | @SuppressWarnings("unused") 48 | public List> getValues() { 49 | return values; 50 | } 51 | 52 | @SuppressWarnings("unused") 53 | public int getId() { 54 | return this.id; 55 | } 56 | 57 | @SuppressWarnings("unused") 58 | public Map getUsers() { 59 | return this.users; 60 | } 61 | 62 | @SuppressWarnings("unused") 63 | public String getSdpAnswer() { 64 | return this.sdpAnswer; 65 | } 66 | 67 | @SuppressWarnings("unused") 68 | public String getSessionId() { 69 | return sessionId; 70 | } 71 | 72 | @SuppressWarnings("unused") 73 | public Method getMethod() { 74 | return method; 75 | } 76 | 77 | @SuppressWarnings("unused") 78 | public List getValue(String key){ 79 | List result = new Vector<>(); 80 | for (HashMap aMap : values) { 81 | result.add(aMap.get(key)); 82 | } 83 | return result; 84 | } 85 | 86 | public String toString(){ 87 | return "RoomResponse: "+id+" - "+sessionId+" - "+valuesToString(); 88 | } 89 | 90 | private String getJSONObjectSessionId(JSONObject obj){ 91 | if(obj.containsKey("sessionId")) { 92 | return obj.get("sessionId").toString(); 93 | } else { 94 | return null; 95 | } 96 | } 97 | 98 | private List> getJSONObjectValues(JSONObject obj){ 99 | List> result = new Vector<>(); 100 | 101 | // Try to find value field. Value is specific to room join response 102 | // and contains a list of all existing users 103 | if(obj.containsKey("value")) { 104 | JSONArray valueArray = (JSONArray)obj.get("value"); 105 | method = Method.JOIN_ROOM; 106 | users = new HashMap<>(); 107 | // Iterate through the user array. The user array contains a list of 108 | // dictionaries, each dict containing field "id" and "streams" 109 | // where "id" is the username and "streams" a list of dictionary. 110 | // Each stream dictionary contains "id" key and the type of the 111 | // stream as the value, which is currently aways "webcam" 112 | for(int i=0; i vArrayElement = new HashMap<>(); 114 | JSONObject jo = (JSONObject) valueArray.get(i); 115 | Set keys = jo.keySet(); 116 | for(String key : keys){ 117 | vArrayElement.put(key, jo.get(key).toString()); 118 | 119 | } 120 | result.add(vArrayElement); 121 | 122 | // Fill in the users dictionary 123 | if (jo.containsKey("id")) { 124 | String username = jo.get("id").toString(); 125 | Boolean webcamPublished; 126 | // If the array entry contains both id and streams then from the 127 | // current implementation we already know that the webcam stream has 128 | // been published 129 | webcamPublished = jo.containsKey("streams"); 130 | users.put(username, webcamPublished); 131 | } 132 | } 133 | } 134 | 135 | if (obj.containsKey("sdpAnswer")){ 136 | sdpAnswer = (String)obj.get("sdpAnswer"); 137 | HashMap vArrayElement = new HashMap<>(); 138 | 139 | vArrayElement.put("sdpAnswer", sdpAnswer); 140 | result.add(vArrayElement); 141 | } 142 | if (result.isEmpty()){ 143 | result = null; 144 | } 145 | 146 | return result; 147 | } 148 | 149 | private String valuesToString(){ 150 | StringBuilder sb = new StringBuilder(); 151 | if(this.values!=null){ 152 | for (HashMap aValueMap : values ) { 153 | sb.append("{"); 154 | for (Map.Entry entry : aValueMap.entrySet()) { 155 | String key = entry.getKey(); 156 | String value = entry.getValue(); 157 | sb.append(key).append("=").append(value).append(", "); 158 | } 159 | sb.append("},"); 160 | } 161 | return sb.toString(); 162 | } else return null; 163 | } 164 | } -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/java/fi/vtt/nubomedia/kurentoroomclientandroid/KurentoAPI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 VTT (http://www.vtt.fi) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package fi.vtt.nubomedia.kurentoroomclientandroid; 19 | 20 | import android.util.Log; 21 | import org.java_websocket.client.WebSocketClient.WebSocketClientFactory; 22 | import org.java_websocket.handshake.ServerHandshake; 23 | import java.net.URI; 24 | import java.util.HashMap; 25 | import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcNotification; 26 | import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcRequest; 27 | import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcResponse; 28 | import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient; 29 | import fi.vtt.nubomedia.utilitiesandroid.LooperExecutor; 30 | 31 | 32 | /** 33 | * Base class for API classes that handles web socket connections and Json-RPC requests and 34 | * responses. 35 | */ 36 | public abstract class KurentoAPI implements JsonRpcWebSocketClient.WebSocketConnectionEvents { 37 | private static final String LOG_TAG = "KurentoAPI"; 38 | protected JsonRpcWebSocketClient client = null; 39 | protected LooperExecutor executor = null; 40 | protected String wsUri = null; 41 | protected WebSocketClientFactory webSocketClientFactory = null; 42 | 43 | /** 44 | * Constructor that initializes required instances and parameters for the API calls. 45 | * WebSocket connections are not established in the constructor. User is responsible 46 | * for opening, closing and checking if the connection is open through the corresponding 47 | * API calls. 48 | * 49 | * @param executor is the asynchronous UI-safe executor for tasks. 50 | * @param uri is the web socket link to the room web services. 51 | */ 52 | public KurentoAPI(LooperExecutor executor, String uri) { 53 | this.executor = executor; 54 | this.wsUri = uri; 55 | } 56 | 57 | /** 58 | * Opens a web socket connection to the predefined URI as provided in the constructor. 59 | * The method responds immediately, whether or not the connection is opened. 60 | * The method isWebSocketConnected() should be called to ensure that the connection is open. 61 | */ 62 | public void connectWebSocket() { 63 | try { 64 | if(isWebSocketConnected()){ 65 | return; 66 | } 67 | URI uri = new URI(wsUri); 68 | client = new JsonRpcWebSocketClient(uri, this,executor); 69 | if (webSocketClientFactory != null) { 70 | client.setWebSocketFactory(webSocketClientFactory); 71 | } 72 | executor.execute(new Runnable() { 73 | public void run() { 74 | client.connect(); 75 | } 76 | }); 77 | } catch (Exception exc){ 78 | Log.e(LOG_TAG, "connectWebSocket", exc); 79 | } 80 | } 81 | 82 | /** 83 | * Method to check if the web socket connection is connected. 84 | * 85 | * @return true if the connection state is connected, and false otherwise. 86 | */ 87 | public boolean isWebSocketConnected(){ 88 | if(client!=null){ 89 | return (client.getConnectionState().equals(JsonRpcWebSocketClient.WebSocketConnectionState.CONNECTED)); 90 | } else { 91 | return false; 92 | } 93 | } 94 | 95 | /** 96 | * Attempts to close the web socket connection asynchronously. 97 | */ 98 | public void disconnectWebSocket() { 99 | try { 100 | if(client!= null ) { 101 | executor.execute(new Runnable() { 102 | public void run() { 103 | client.disconnect(false); 104 | } 105 | }); 106 | } 107 | } catch (Exception exc){ 108 | Log.e(LOG_TAG, "disconnectWebSocket", exc); 109 | } finally { 110 | ; 111 | } 112 | } 113 | 114 | /** 115 | * 116 | * @param method 117 | * @param namedParameters 118 | * @param id 119 | */ 120 | protected void send(String method, HashMap namedParameters, int id){ 121 | 122 | try { 123 | final JsonRpcRequest request = new JsonRpcRequest(); 124 | request.setMethod(method); 125 | if(namedParameters!=null) { 126 | request.setNamedParams(namedParameters); 127 | } 128 | if(id>=0) { 129 | request.setId(id); 130 | } 131 | executor.execute(new Runnable() { 132 | public void run() { 133 | if(isWebSocketConnected()) { 134 | client.sendRequest(request); 135 | } 136 | } 137 | }); 138 | } catch (Exception exc){ 139 | Log.e(LOG_TAG, "send: "+method, exc); 140 | } 141 | } 142 | 143 | 144 | /* WEB SOCKET CONNECTION EVENTS */ 145 | 146 | @Override 147 | public void onOpen(ServerHandshake handshakedata) { 148 | ; 149 | } 150 | 151 | @Override 152 | public void onRequest(JsonRpcRequest request) { 153 | ; 154 | } 155 | 156 | @Override 157 | public void onResponse(JsonRpcResponse response) { 158 | ; 159 | } 160 | 161 | @Override 162 | public void onNotification(JsonRpcNotification notification) { 163 | ; 164 | } 165 | 166 | @Override 167 | public void onClose(int code, String reason, boolean remote) { 168 | ; 169 | } 170 | 171 | @Override 172 | public void onError(Exception e) { 173 | Log.e(LOG_TAG, "onError: "+e.getMessage(), e); 174 | } 175 | 176 | } 177 | -------------------------------------------------------------------------------- /javadoc/overview-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 |
41 | 68 | 69 |
70 |

Hierarchy For All Packages

71 | Package Hierarchies: 72 | 75 |
76 |
77 |

Class Hierarchy

78 |
    79 |
  • java.lang.Object 80 |
      81 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.KurentoAPI (implements fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents) 82 | 85 |
    • 86 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomError
    • 87 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomNotification
    • 88 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomResponse
    • 89 |
    90 |
  • 91 |
92 |

Interface Hierarchy

93 |
    94 |
  • fi.vtt.nubomedia.kurentoroomclientandroid.RoomListener
  • 95 |
96 |

Enum Hierarchy

97 |
    98 |
  • java.lang.Object 99 |
      100 |
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) 101 | 105 |
    • 106 |
    107 |
  • 108 |
109 |
110 | 111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 125 |
126 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /javadoc/fi/vtt/nubomedia/kurentoroomclientandroid/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | fi.vtt.nubomedia.kurentoroomclientandroid Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 |
41 | 68 | 69 |
70 |

Hierarchy For Package fi.vtt.nubomedia.kurentoroomclientandroid

71 |
72 |
73 |

Class Hierarchy

74 |
    75 |
  • java.lang.Object 76 |
      77 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.KurentoAPI (implements fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents) 78 | 81 |
    • 82 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomError
    • 83 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomNotification
    • 84 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomResponse
    • 85 |
    86 |
  • 87 |
88 |

Interface Hierarchy

89 |
    90 |
  • fi.vtt.nubomedia.kurentoroomclientandroid.RoomListener
  • 91 |
92 |

Enum Hierarchy

93 |
    94 |
  • java.lang.Object 95 |
      96 |
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) 97 | 101 |
    • 102 |
    103 |
  • 104 |
105 |
106 | 107 |
108 | 109 | 110 | 111 | 112 | 113 | 114 | 121 |
122 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /javadoc/constant-values.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Constant Field Values 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 |
41 | 68 | 69 |
70 |

Constant Field Values

71 |

Contents

72 | 75 |
76 |
77 | 78 | 79 |

fi.vtt.*

80 | 143 |
144 | 145 |
146 | 147 | 148 | 149 | 150 | 151 | 152 | 159 |
160 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /javadoc/fi/vtt/nubomedia/kurentoroomclientandroid/ApplicationTest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ApplicationTest 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 |
41 | 83 | 84 | 85 |
86 |
fi.vtt.nubomedia.kurentoroomclientandroid
87 |

Class ApplicationTest

88 |
89 |
90 |
    91 |
  • java.lang.Object
  • 92 |
  • 93 |
      94 |
    • <any>
    • 95 |
    • 96 |
        97 |
      • fi.vtt.nubomedia.kurentoroomclientandroid.ApplicationTest
      • 98 |
      99 |
    • 100 |
    101 |
  • 102 |
103 |
104 |
    105 |
  • 106 |
    107 |
    108 |
    public class ApplicationTest
    109 | extends <any>
    110 | 111 |
  • 112 |
113 |
114 |
115 |
    116 |
  • 117 | 118 |
      119 |
    • 120 | 121 | 122 |

      Constructor Summary

      123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
      Constructors 
      Constructor and Description
      ApplicationTest() 
      132 |
    • 133 |
    134 | 135 |
      136 |
    • 137 | 138 | 139 |

      Method Summary

      140 |
        141 |
      • 142 | 143 | 144 |

        Methods inherited from class java.lang.Object

        145 | equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 146 |
      147 |
    • 148 |
    149 |
  • 150 |
151 |
152 |
153 |
    154 |
  • 155 | 156 |
      157 |
    • 158 | 159 | 160 |

      Constructor Detail

      161 | 162 | 163 | 164 |
        165 |
      • 166 |

        ApplicationTest

        167 |
        public ApplicationTest()
        168 |
      • 169 |
      170 |
    • 171 |
    172 |
  • 173 |
174 |
175 |
176 | 177 | 178 |
179 | 180 | 181 | 182 | 183 | 184 | 185 | 192 |
193 | 235 | 236 | 237 | 238 | -------------------------------------------------------------------------------- /javadoc/fi/vtt/nubomedia/kurentoroomclientandroid/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | fi.vtt.nubomedia.kurentoroomclientandroid 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 |
41 | 68 | 69 |
70 |

Package fi.vtt.nubomedia.kurentoroomclientandroid

71 |
72 |
73 |
    74 |
  • 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 87 | 88 | 89 |
    Interface Summary 
    InterfaceDescription
    RoomListener 85 |
    Interface class defining the KurentoRoomAPI room events
    86 |
    90 |
  • 91 |
  • 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 105 | 106 | 107 | 108 | 112 | 113 | 114 | 115 | 118 | 119 | 120 | 121 | 124 | 125 | 126 | 127 | 130 | 131 | 132 |
    Class Summary 
    ClassDescription
    KurentoAPI 102 |
    Base class for API classes that handles web socket connections and Json-RPC requests and 103 | responses.
    104 |
    KurentoRoomAPI 109 |
    Class that handles all Room API calls and passes asynchronous 110 | responses and notifications to a RoomListener interface.
    111 |
    RoomError 116 |
    Room error class
    117 |
    RoomNotification 122 |
    Room notification class
    123 |
    RoomResponse 128 |
    Room response class
    129 |
    133 |
  • 134 |
  • 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 |
    Enum Summary 
    EnumDescription
    KurentoRoomAPI.Method 
    RoomError.Code 
    152 |
  • 153 |
154 |
155 | 156 |
157 | 158 | 159 | 160 | 161 | 162 | 163 | 170 |
171 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /javadoc/help-doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | API Help 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 |
41 | 68 | 69 |
70 |

How This API Document Is Organized

71 |
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
72 |
73 |
74 |
    75 |
  • 76 |

    Package

    77 |

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    78 |
      79 |
    • Interfaces (italic)
    • 80 |
    • Classes
    • 81 |
    • Enums
    • 82 |
    • Exceptions
    • 83 |
    • Errors
    • 84 |
    • Annotation Types
    • 85 |
    86 |
  • 87 |
  • 88 |

    Class/Interface

    89 |

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    90 |
      91 |
    • Class inheritance diagram
    • 92 |
    • Direct Subclasses
    • 93 |
    • All Known Subinterfaces
    • 94 |
    • All Known Implementing Classes
    • 95 |
    • Class/interface declaration
    • 96 |
    • Class/interface description
    • 97 |
    98 |
      99 |
    • Nested Class Summary
    • 100 |
    • Field Summary
    • 101 |
    • Constructor Summary
    • 102 |
    • Method Summary
    • 103 |
    104 |
      105 |
    • Field Detail
    • 106 |
    • Constructor Detail
    • 107 |
    • Method Detail
    • 108 |
    109 |

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    110 |
  • 111 |
  • 112 |

    Annotation Type

    113 |

    Each annotation type has its own separate page with the following sections:

    114 |
      115 |
    • Annotation Type declaration
    • 116 |
    • Annotation Type description
    • 117 |
    • Required Element Summary
    • 118 |
    • Optional Element Summary
    • 119 |
    • Element Detail
    • 120 |
    121 |
  • 122 |
  • 123 |

    Enum

    124 |

    Each enum has its own separate page with the following sections:

    125 |
      126 |
    • Enum declaration
    • 127 |
    • Enum description
    • 128 |
    • Enum Constant Summary
    • 129 |
    • Enum Constant Detail
    • 130 |
    131 |
  • 132 |
  • 133 |

    Tree (Class Hierarchy)

    134 |

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    135 |
      136 |
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • 137 |
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • 138 |
    139 |
  • 140 |
  • 141 |

    Deprecated API

    142 |

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    143 |
  • 144 |
  • 145 |

    Prev/Next

    146 |

    These links take you to the next or previous class, interface, package, or related page.

    147 |
  • 148 |
  • 149 |

    Frames/No Frames

    150 |

    These links show and hide the HTML frames. All pages are available with or without frames.

    151 |
  • 152 |
  • 153 |

    All Classes

    154 |

    The All Classes link shows all classes and interfaces except non-static nested types.

    155 |
  • 156 |
  • 157 |

    Serialized Form

    158 |

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    159 |
  • 160 |
  • 161 |

    Constant Field Values

    162 |

    The Constant Field Values page lists the static final fields and their values.

    163 |
  • 164 |
165 | This help file applies to API documentation generated using the standard doclet.
166 | 167 |
168 | 169 | 170 | 171 | 172 | 173 | 174 | 181 |
182 | 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. -------------------------------------------------------------------------------- /javadoc/fi/vtt/nubomedia/kurentoroomclientandroid/RoomNotification.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RoomNotification 7 | 8 | 9 | 10 | 11 | 12 | 28 | 31 | 32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 46 |
47 | 89 | 90 | 91 |
92 |
fi.vtt.nubomedia.kurentoroomclientandroid
93 |

Class RoomNotification

94 |
95 |
96 |
    97 |
  • java.lang.Object
  • 98 |
  • 99 |
      100 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomNotification
    • 101 |
    102 |
  • 103 |
104 |
105 |
    106 |
  • 107 |
    108 |
    109 |
    public class RoomNotification
    110 | extends java.lang.Object
    111 |
    Room notification class
    112 |
  • 113 |
114 |
115 |
116 |
    117 |
  • 118 | 119 |
      120 |
    • 121 | 122 | 123 |

      Constructor Summary

      124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 |
      Constructors 
      Constructor and Description
      RoomNotification(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcNotification obj) 
      133 |
    • 134 |
    135 | 136 |
      137 |
    • 138 | 139 | 140 |

      Method Summary

      141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 |
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.StringgetMethod() 
      java.lang.ObjectgetParam(java.lang.String key) 
      java.util.Map<java.lang.String,java.lang.Object>getParams() 
      java.lang.StringtoString() 
      164 |
        165 |
      • 166 | 167 | 168 |

        Methods inherited from class java.lang.Object

        169 | equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • 170 |
      171 |
    • 172 |
    173 |
  • 174 |
175 |
176 |
177 |
    178 |
  • 179 | 180 |
      181 |
    • 182 | 183 | 184 |

      Constructor Detail

      185 | 186 | 187 | 188 |
        189 |
      • 190 |

        RoomNotification

        191 |
        public RoomNotification(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcNotification obj)
        192 |
      • 193 |
      194 |
    • 195 |
    196 | 197 |
      198 |
    • 199 | 200 | 201 |

      Method Detail

      202 | 203 | 204 | 205 |
        206 |
      • 207 |

        getParams

        208 |
        public java.util.Map<java.lang.String,java.lang.Object> getParams()
        209 |
      • 210 |
      211 | 212 | 213 | 214 |
        215 |
      • 216 |

        getParam

        217 |
        public java.lang.Object getParam(java.lang.String key)
        218 |
      • 219 |
      220 | 221 | 222 | 223 |
        224 |
      • 225 |

        getMethod

        226 |
        public java.lang.String getMethod()
        227 |
      • 228 |
      229 | 230 | 231 | 232 |
        233 |
      • 234 |

        toString

        235 |
        public java.lang.String toString()
        236 |
        237 |
        Overrides:
        238 |
        toString in class java.lang.Object
        239 |
        240 |
      • 241 |
      242 |
    • 243 |
    244 |
  • 245 |
246 |
247 |
248 | 249 | 250 |
251 | 252 | 253 | 254 | 255 | 256 | 257 | 264 |
265 | 307 | 308 | 309 | 310 | -------------------------------------------------------------------------------- /javadoc/fi/vtt/nubomedia/kurentoroomclientandroid/RoomError.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RoomError 7 | 8 | 9 | 10 | 11 | 12 | 28 | 31 | 32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 46 |
47 | 89 | 90 | 91 |
92 |
fi.vtt.nubomedia.kurentoroomclientandroid
93 |

Class RoomError

94 |
95 |
96 |
    97 |
  • java.lang.Object
  • 98 |
  • 99 |
      100 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomError
    • 101 |
    102 |
  • 103 |
104 |
105 |
    106 |
  • 107 |
    108 |
    109 |
    public class RoomError
    110 | extends java.lang.Object
    111 |
    Room error class
    112 |
  • 113 |
114 |
115 |
116 |
    117 |
  • 118 | 119 |
      120 |
    • 121 | 122 | 123 |

      Nested Class Summary

      124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 |
      Nested Classes 
      Modifier and TypeClass and Description
      static class RoomError.Code 
      135 |
    • 136 |
    137 | 138 |
      139 |
    • 140 | 141 | 142 |

      Constructor Summary

      143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 |
      Constructors 
      Constructor and Description
      RoomError(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcResponseError error) 
      152 |
    • 153 |
    154 | 155 |
      156 |
    • 157 | 158 | 159 |

      Method Summary

      160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 |
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      intgetCode() 
      java.lang.StringgetData() 
      java.lang.StringtoString() 
      179 |
        180 |
      • 181 | 182 | 183 |

        Methods inherited from class java.lang.Object

        184 | equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • 185 |
      186 |
    • 187 |
    188 |
  • 189 |
190 |
191 |
192 |
    193 |
  • 194 | 195 |
      196 |
    • 197 | 198 | 199 |

      Constructor Detail

      200 | 201 | 202 | 203 |
        204 |
      • 205 |

        RoomError

        206 |
        public RoomError(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcResponseError error)
        207 |
      • 208 |
      209 |
    • 210 |
    211 | 212 |
      213 |
    • 214 | 215 | 216 |

      Method Detail

      217 | 218 | 219 | 220 |
        221 |
      • 222 |

        getCode

        223 |
        public int getCode()
        224 |
      • 225 |
      226 | 227 | 228 | 229 |
        230 |
      • 231 |

        getData

        232 |
        public java.lang.String getData()
        233 |
      • 234 |
      235 | 236 | 237 | 238 |
        239 |
      • 240 |

        toString

        241 |
        public java.lang.String toString()
        242 |
        243 |
        Overrides:
        244 |
        toString in class java.lang.Object
        245 |
        246 |
      • 247 |
      248 |
    • 249 |
    250 |
  • 251 |
252 |
253 |
254 | 255 | 256 |
257 | 258 | 259 | 260 | 261 | 262 | 263 | 270 |
271 | 313 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /javadoc/fi/vtt/nubomedia/kurentoroomclientandroid/RoomResponse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RoomResponse 7 | 8 | 9 | 10 | 11 | 12 | 28 | 31 | 32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 46 |
47 | 89 | 90 | 91 |
92 |
fi.vtt.nubomedia.kurentoroomclientandroid
93 |

Class RoomResponse

94 |
95 |
96 |
    97 |
  • java.lang.Object
  • 98 |
  • 99 |
      100 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.RoomResponse
    • 101 |
    102 |
  • 103 |
104 |
105 |
    106 |
  • 107 |
    108 |
    109 |
    public class RoomResponse
    110 | extends java.lang.Object
    111 |
    Room response class
    112 |
  • 113 |
114 |
115 |
116 |
    117 |
  • 118 | 119 |
      120 |
    • 121 | 122 | 123 |

      Constructor Summary

      124 | 125 | 126 | 127 | 128 | 129 | 130 | 132 | 133 |
      Constructors 
      Constructor and Description
      RoomResponse(java.lang.String id, 131 | net.minidev.json.JSONObject obj) 
      134 |
    • 135 |
    136 | 137 |
      138 |
    • 139 | 140 | 141 |

      Method Summary

      142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 |
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      intgetId() 
      KurentoRoomAPI.MethodgetMethod() 
      java.lang.StringgetSdpAnswer() 
      java.lang.StringgetSessionId() 
      java.util.Map<java.lang.String,java.lang.Boolean>getUsers() 
      java.util.List<java.lang.String>getValue(java.lang.String key) 
      java.util.List<java.util.HashMap<java.lang.String,java.lang.String>>getValues() 
      java.lang.StringtoString() 
      181 |
        182 |
      • 183 | 184 | 185 |

        Methods inherited from class java.lang.Object

        186 | equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • 187 |
      188 |
    • 189 |
    190 |
  • 191 |
192 |
193 |
194 |
    195 |
  • 196 | 197 |
      198 |
    • 199 | 200 | 201 |

      Constructor Detail

      202 | 203 | 204 | 205 |
        206 |
      • 207 |

        RoomResponse

        208 |
        public RoomResponse(java.lang.String id,
        209 |                     net.minidev.json.JSONObject obj)
        210 |
      • 211 |
      212 |
    • 213 |
    214 | 215 |
      216 |
    • 217 | 218 | 219 |

      Method Detail

      220 | 221 | 222 | 223 |
        224 |
      • 225 |

        getValues

        226 |
        public java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> getValues()
        227 |
      • 228 |
      229 | 230 | 231 | 232 |
        233 |
      • 234 |

        getId

        235 |
        public int getId()
        236 |
      • 237 |
      238 | 239 | 240 | 241 |
        242 |
      • 243 |

        getUsers

        244 |
        public java.util.Map<java.lang.String,java.lang.Boolean> getUsers()
        245 |
      • 246 |
      247 | 248 | 249 | 250 |
        251 |
      • 252 |

        getSdpAnswer

        253 |
        public java.lang.String getSdpAnswer()
        254 |
      • 255 |
      256 | 257 | 258 | 259 |
        260 |
      • 261 |

        getSessionId

        262 |
        public java.lang.String getSessionId()
        263 |
      • 264 |
      265 | 266 | 267 | 268 | 274 | 275 | 276 | 277 |
        278 |
      • 279 |

        getValue

        280 |
        public java.util.List<java.lang.String> getValue(java.lang.String key)
        281 |
      • 282 |
      283 | 284 | 285 | 286 |
        287 |
      • 288 |

        toString

        289 |
        public java.lang.String toString()
        290 |
        291 |
        Overrides:
        292 |
        toString in class java.lang.Object
        293 |
        294 |
      • 295 |
      296 |
    • 297 |
    298 |
  • 299 |
300 |
301 |
302 | 303 | 304 |
305 | 306 | 307 | 308 | 309 | 310 | 311 | 318 |
319 | 361 | 362 | 363 | 364 | -------------------------------------------------------------------------------- /javadoc/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | /* 3 | Overall document style 4 | */ 5 | 6 | @import url('resources/fonts/dejavu.css'); 7 | 8 | body { 9 | background-color:#ffffff; 10 | color:#353833; 11 | font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; 12 | font-size:14px; 13 | margin:0; 14 | } 15 | a:link, a:visited { 16 | text-decoration:none; 17 | color:#4A6782; 18 | } 19 | a:hover, a:focus { 20 | text-decoration:none; 21 | color:#bb7a2a; 22 | } 23 | a:active { 24 | text-decoration:none; 25 | color:#4A6782; 26 | } 27 | a[name] { 28 | color:#353833; 29 | } 30 | a[name]:hover { 31 | text-decoration:none; 32 | color:#353833; 33 | } 34 | pre { 35 | font-family:'DejaVu Sans Mono', monospace; 36 | font-size:14px; 37 | } 38 | h1 { 39 | font-size:20px; 40 | } 41 | h2 { 42 | font-size:18px; 43 | } 44 | h3 { 45 | font-size:16px; 46 | font-style:italic; 47 | } 48 | h4 { 49 | font-size:13px; 50 | } 51 | h5 { 52 | font-size:12px; 53 | } 54 | h6 { 55 | font-size:11px; 56 | } 57 | ul { 58 | list-style-type:disc; 59 | } 60 | code, tt { 61 | font-family:'DejaVu Sans Mono', monospace; 62 | font-size:14px; 63 | padding-top:4px; 64 | margin-top:8px; 65 | line-height:1.4em; 66 | } 67 | dt code { 68 | font-family:'DejaVu Sans Mono', monospace; 69 | font-size:14px; 70 | padding-top:4px; 71 | } 72 | table tr td dt code { 73 | font-family:'DejaVu Sans Mono', monospace; 74 | font-size:14px; 75 | vertical-align:top; 76 | padding-top:4px; 77 | } 78 | sup { 79 | font-size:8px; 80 | } 81 | /* 82 | Document title and Copyright styles 83 | */ 84 | .clear { 85 | clear:both; 86 | height:0px; 87 | overflow:hidden; 88 | } 89 | .aboutLanguage { 90 | float:right; 91 | padding:0px 21px; 92 | font-size:11px; 93 | z-index:200; 94 | margin-top:-9px; 95 | } 96 | .legalCopy { 97 | margin-left:.5em; 98 | } 99 | .bar a, .bar a:link, .bar a:visited, .bar a:active { 100 | color:#FFFFFF; 101 | text-decoration:none; 102 | } 103 | .bar a:hover, .bar a:focus { 104 | color:#bb7a2a; 105 | } 106 | .tab { 107 | background-color:#0066FF; 108 | color:#ffffff; 109 | padding:8px; 110 | width:5em; 111 | font-weight:bold; 112 | } 113 | /* 114 | Navigation bar styles 115 | */ 116 | .bar { 117 | background-color:#4D7A97; 118 | color:#FFFFFF; 119 | padding:.8em .5em .4em .8em; 120 | height:auto;/*height:1.8em;*/ 121 | font-size:11px; 122 | margin:0; 123 | } 124 | .topNav { 125 | background-color:#4D7A97; 126 | color:#FFFFFF; 127 | float:left; 128 | padding:0; 129 | width:100%; 130 | clear:right; 131 | height:2.8em; 132 | padding-top:10px; 133 | overflow:hidden; 134 | font-size:12px; 135 | } 136 | .bottomNav { 137 | margin-top:10px; 138 | background-color:#4D7A97; 139 | color:#FFFFFF; 140 | float:left; 141 | padding:0; 142 | width:100%; 143 | clear:right; 144 | height:2.8em; 145 | padding-top:10px; 146 | overflow:hidden; 147 | font-size:12px; 148 | } 149 | .subNav { 150 | background-color:#dee3e9; 151 | float:left; 152 | width:100%; 153 | overflow:hidden; 154 | font-size:12px; 155 | } 156 | .subNav div { 157 | clear:left; 158 | float:left; 159 | padding:0 0 5px 6px; 160 | text-transform:uppercase; 161 | } 162 | ul.navList, ul.subNavList { 163 | float:left; 164 | margin:0 25px 0 0; 165 | padding:0; 166 | } 167 | ul.navList li{ 168 | list-style:none; 169 | float:left; 170 | padding: 5px 6px; 171 | text-transform:uppercase; 172 | } 173 | ul.subNavList li{ 174 | list-style:none; 175 | float:left; 176 | } 177 | .topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { 178 | color:#FFFFFF; 179 | text-decoration:none; 180 | text-transform:uppercase; 181 | } 182 | .topNav a:hover, .bottomNav a:hover { 183 | text-decoration:none; 184 | color:#bb7a2a; 185 | text-transform:uppercase; 186 | } 187 | .navBarCell1Rev { 188 | background-color:#F8981D; 189 | color:#253441; 190 | margin: auto 5px; 191 | } 192 | .skipNav { 193 | position:absolute; 194 | top:auto; 195 | left:-9999px; 196 | overflow:hidden; 197 | } 198 | /* 199 | Page header and footer styles 200 | */ 201 | .header, .footer { 202 | clear:both; 203 | margin:0 20px; 204 | padding:5px 0 0 0; 205 | } 206 | .indexHeader { 207 | margin:10px; 208 | position:relative; 209 | } 210 | .indexHeader span{ 211 | margin-right:15px; 212 | } 213 | .indexHeader h1 { 214 | font-size:13px; 215 | } 216 | .title { 217 | color:#2c4557; 218 | margin:10px 0; 219 | } 220 | .subTitle { 221 | margin:5px 0 0 0; 222 | } 223 | .header ul { 224 | margin:0 0 15px 0; 225 | padding:0; 226 | } 227 | .footer ul { 228 | margin:20px 0 5px 0; 229 | } 230 | .header ul li, .footer ul li { 231 | list-style:none; 232 | font-size:13px; 233 | } 234 | /* 235 | Heading styles 236 | */ 237 | div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { 238 | background-color:#dee3e9; 239 | border:1px solid #d0d9e0; 240 | margin:0 0 6px -8px; 241 | padding:7px 5px; 242 | } 243 | ul.blockList ul.blockList ul.blockList li.blockList h3 { 244 | background-color:#dee3e9; 245 | border:1px solid #d0d9e0; 246 | margin:0 0 6px -8px; 247 | padding:7px 5px; 248 | } 249 | ul.blockList ul.blockList li.blockList h3 { 250 | padding:0; 251 | margin:15px 0; 252 | } 253 | ul.blockList li.blockList h2 { 254 | padding:0px 0 20px 0; 255 | } 256 | /* 257 | Page layout container styles 258 | */ 259 | .contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { 260 | clear:both; 261 | padding:10px 20px; 262 | position:relative; 263 | } 264 | .indexContainer { 265 | margin:10px; 266 | position:relative; 267 | font-size:12px; 268 | } 269 | .indexContainer h2 { 270 | font-size:13px; 271 | padding:0 0 3px 0; 272 | } 273 | .indexContainer ul { 274 | margin:0; 275 | padding:0; 276 | } 277 | .indexContainer ul li { 278 | list-style:none; 279 | padding-top:2px; 280 | } 281 | .contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { 282 | font-size:12px; 283 | font-weight:bold; 284 | margin:10px 0 0 0; 285 | color:#4E4E4E; 286 | } 287 | .contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { 288 | margin:5px 0 10px 0px; 289 | font-size:14px; 290 | font-family:'DejaVu Sans Mono',monospace; 291 | } 292 | .serializedFormContainer dl.nameValue dt { 293 | margin-left:1px; 294 | font-size:1.1em; 295 | display:inline; 296 | font-weight:bold; 297 | } 298 | .serializedFormContainer dl.nameValue dd { 299 | margin:0 0 0 1px; 300 | font-size:1.1em; 301 | display:inline; 302 | } 303 | /* 304 | List styles 305 | */ 306 | ul.horizontal li { 307 | display:inline; 308 | font-size:0.9em; 309 | } 310 | ul.inheritance { 311 | margin:0; 312 | padding:0; 313 | } 314 | ul.inheritance li { 315 | display:inline; 316 | list-style:none; 317 | } 318 | ul.inheritance li ul.inheritance { 319 | margin-left:15px; 320 | padding-left:15px; 321 | padding-top:1px; 322 | } 323 | ul.blockList, ul.blockListLast { 324 | margin:10px 0 10px 0; 325 | padding:0; 326 | } 327 | ul.blockList li.blockList, ul.blockListLast li.blockList { 328 | list-style:none; 329 | margin-bottom:15px; 330 | line-height:1.4; 331 | } 332 | ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { 333 | padding:0px 20px 5px 10px; 334 | border:1px solid #ededed; 335 | background-color:#f8f8f8; 336 | } 337 | ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { 338 | padding:0 0 5px 8px; 339 | background-color:#ffffff; 340 | border:none; 341 | } 342 | ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { 343 | margin-left:0; 344 | padding-left:0; 345 | padding-bottom:15px; 346 | border:none; 347 | } 348 | ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { 349 | list-style:none; 350 | border-bottom:none; 351 | padding-bottom:0; 352 | } 353 | table tr td dl, table tr td dl dt, table tr td dl dd { 354 | margin-top:0; 355 | margin-bottom:1px; 356 | } 357 | /* 358 | Table styles 359 | */ 360 | .overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { 361 | width:100%; 362 | border-left:1px solid #EEE; 363 | border-right:1px solid #EEE; 364 | border-bottom:1px solid #EEE; 365 | } 366 | .overviewSummary, .memberSummary { 367 | padding:0px; 368 | } 369 | .overviewSummary caption, .memberSummary caption, .typeSummary caption, 370 | .useSummary caption, .constantsSummary caption, .deprecatedSummary caption { 371 | position:relative; 372 | text-align:left; 373 | background-repeat:no-repeat; 374 | color:#253441; 375 | font-weight:bold; 376 | clear:none; 377 | overflow:hidden; 378 | padding:0px; 379 | padding-top:10px; 380 | padding-left:1px; 381 | margin:0px; 382 | white-space:pre; 383 | } 384 | .overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, 385 | .useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, 386 | .overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, 387 | .useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, 388 | .overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, 389 | .useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, 390 | .overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, 391 | .useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { 392 | color:#FFFFFF; 393 | } 394 | .overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, 395 | .useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { 396 | white-space:nowrap; 397 | padding-top:5px; 398 | padding-left:12px; 399 | padding-right:12px; 400 | padding-bottom:7px; 401 | display:inline-block; 402 | float:left; 403 | background-color:#F8981D; 404 | border: none; 405 | height:16px; 406 | } 407 | .memberSummary caption span.activeTableTab span { 408 | white-space:nowrap; 409 | padding-top:5px; 410 | padding-left:12px; 411 | padding-right:12px; 412 | margin-right:3px; 413 | display:inline-block; 414 | float:left; 415 | background-color:#F8981D; 416 | height:16px; 417 | } 418 | .memberSummary caption span.tableTab span { 419 | white-space:nowrap; 420 | padding-top:5px; 421 | padding-left:12px; 422 | padding-right:12px; 423 | margin-right:3px; 424 | display:inline-block; 425 | float:left; 426 | background-color:#4D7A97; 427 | height:16px; 428 | } 429 | .memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { 430 | padding-top:0px; 431 | padding-left:0px; 432 | padding-right:0px; 433 | background-image:none; 434 | float:none; 435 | display:inline; 436 | } 437 | .overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, 438 | .useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { 439 | display:none; 440 | width:5px; 441 | position:relative; 442 | float:left; 443 | background-color:#F8981D; 444 | } 445 | .memberSummary .activeTableTab .tabEnd { 446 | display:none; 447 | width:5px; 448 | margin-right:3px; 449 | position:relative; 450 | float:left; 451 | background-color:#F8981D; 452 | } 453 | .memberSummary .tableTab .tabEnd { 454 | display:none; 455 | width:5px; 456 | margin-right:3px; 457 | position:relative; 458 | background-color:#4D7A97; 459 | float:left; 460 | 461 | } 462 | .overviewSummary td, .memberSummary td, .typeSummary td, 463 | .useSummary td, .constantsSummary td, .deprecatedSummary td { 464 | text-align:left; 465 | padding:0px 0px 12px 10px; 466 | } 467 | th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, 468 | td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ 469 | vertical-align:top; 470 | padding-right:0px; 471 | padding-top:8px; 472 | padding-bottom:3px; 473 | } 474 | th.colFirst, th.colLast, th.colOne, .constantsSummary th { 475 | background:#dee3e9; 476 | text-align:left; 477 | padding:8px 3px 3px 7px; 478 | } 479 | td.colFirst, th.colFirst { 480 | white-space:nowrap; 481 | font-size:13px; 482 | } 483 | td.colLast, th.colLast { 484 | font-size:13px; 485 | } 486 | td.colOne, th.colOne { 487 | font-size:13px; 488 | } 489 | .overviewSummary td.colFirst, .overviewSummary th.colFirst, 490 | .useSummary td.colFirst, .useSummary th.colFirst, 491 | .overviewSummary td.colOne, .overviewSummary th.colOne, 492 | .memberSummary td.colFirst, .memberSummary th.colFirst, 493 | .memberSummary td.colOne, .memberSummary th.colOne, 494 | .typeSummary td.colFirst{ 495 | width:25%; 496 | vertical-align:top; 497 | } 498 | td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { 499 | font-weight:bold; 500 | } 501 | .tableSubHeadingColor { 502 | background-color:#EEEEFF; 503 | } 504 | .altColor { 505 | background-color:#FFFFFF; 506 | } 507 | .rowColor { 508 | background-color:#EEEEEF; 509 | } 510 | /* 511 | Content styles 512 | */ 513 | .description pre { 514 | margin-top:0; 515 | } 516 | .deprecatedContent { 517 | margin:0; 518 | padding:10px 0; 519 | } 520 | .docSummary { 521 | padding:0; 522 | } 523 | 524 | ul.blockList ul.blockList ul.blockList li.blockList h3 { 525 | font-style:normal; 526 | } 527 | 528 | div.block { 529 | font-size:14px; 530 | font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; 531 | } 532 | 533 | td.colLast div { 534 | padding-top:0px; 535 | } 536 | 537 | 538 | td.colLast a { 539 | padding-bottom:3px; 540 | } 541 | /* 542 | Formatting effect styles 543 | */ 544 | .sourceLineNo { 545 | color:green; 546 | padding:0 30px 0 0; 547 | } 548 | h1.hidden { 549 | visibility:hidden; 550 | overflow:hidden; 551 | font-size:10px; 552 | } 553 | .block { 554 | display:block; 555 | margin:3px 10px 2px 0px; 556 | color:#474747; 557 | } 558 | .deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, 559 | .overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, 560 | .seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { 561 | font-weight:bold; 562 | } 563 | .deprecationComment, .emphasizedPhrase, .interfaceName { 564 | font-style:italic; 565 | } 566 | 567 | div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, 568 | div.block div.block span.interfaceName { 569 | font-style:normal; 570 | } 571 | 572 | div.contentContainer ul.blockList li.blockList h2{ 573 | padding-bottom:0px; 574 | } 575 | -------------------------------------------------------------------------------- /kurento-room-client-android/src/main/java/fi/vtt/nubomedia/kurentoroomclientandroid/KurentoRoomAPI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 VTT (http://www.vtt.fi) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package fi.vtt.nubomedia.kurentoroomclientandroid; 19 | 20 | import android.util.Log; 21 | 22 | import net.minidev.json.JSONObject; 23 | 24 | import org.java_websocket.client.DefaultSSLWebSocketClientFactory; 25 | import org.java_websocket.handshake.ServerHandshake; 26 | import java.io.IOException; 27 | import java.net.URI; 28 | import java.net.URISyntaxException; 29 | import java.security.KeyManagementException; 30 | import java.security.KeyStore; 31 | import java.security.KeyStoreException; 32 | import java.security.NoSuchAlgorithmException; 33 | import java.security.cert.Certificate; 34 | import java.security.cert.CertificateException; 35 | import java.util.HashMap; 36 | import java.util.Vector; 37 | import javax.net.ssl.SSLContext; 38 | import javax.net.ssl.TrustManagerFactory; 39 | import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcNotification; 40 | import fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcResponse; 41 | import fi.vtt.nubomedia.utilitiesandroid.LooperExecutor; 42 | 43 | /** 44 | * Class that handles all Room API calls and passes asynchronous 45 | * responses and notifications to a RoomListener interface. 46 | */ 47 | public class KurentoRoomAPI extends KurentoAPI { 48 | 49 | public enum Method {JOIN_ROOM, PUBLISH_VIDEO, UNPUBLISH_VIDEO, RECEIVE_VIDEO, STOP_RECEIVE_VIDEO} 50 | 51 | private static final String LOG_TAG = "KurentoRoomAPI"; 52 | private KeyStore keyStore; 53 | private boolean usingSelfSigned = false; 54 | private Vector listeners; 55 | 56 | /** 57 | * Constructor that initializes required instances and parameters for the API calls. 58 | * WebSocket connections are not established in the constructor. User is responsible 59 | * for opening, closing and checking if the connection is open through the corresponding 60 | * API calls. 61 | * 62 | * @param executor is the asynchronous UI-safe executor for tasks. 63 | * @param uri is the web socket link to the room web services. 64 | * @param listener interface handles the callbacks for responses, notifications and errors. 65 | */ 66 | public KurentoRoomAPI(LooperExecutor executor, String uri, RoomListener listener){ 67 | super(executor, uri); 68 | 69 | listeners = new Vector<>(); 70 | listeners.add(listener); 71 | 72 | // Create a KeyStore containing our trusted CAs 73 | try { 74 | keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); 75 | keyStore.load(null, null); 76 | } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | IOException e) { 77 | e.printStackTrace(); 78 | } 79 | } 80 | 81 | /** 82 | * Method for the user to join the room. If the room does not exist previously, 83 | * it will be created. 84 | * 85 | * The response will contain the list of users and their streams in the room. 86 | * 87 | * @param userId is the username as it appears to all other users. 88 | * @param roomId is the name of the room to be joined. 89 | * @param dataChannelsEnabled True if data channels should be enabled for this user 90 | * @param id is an index number to track the corresponding response message to this request. 91 | */ 92 | @SuppressWarnings("unused") 93 | public void sendJoinRoom(String userId, String roomId, boolean dataChannelsEnabled, int id){ 94 | HashMap namedParameters = new HashMap<>(); 95 | namedParameters.put("user", userId); 96 | namedParameters.put("room", roomId); 97 | namedParameters.put("dataChannels", dataChannelsEnabled); 98 | send("joinRoom", namedParameters, id); 99 | } 100 | 101 | /** 102 | * Method will leave the current room. 103 | * 104 | * @param id is an index number to track the corresponding response message to this request. 105 | */ 106 | @SuppressWarnings("unused") 107 | public void sendLeaveRoom(int id){ 108 | send("leaveRoom", null, id); 109 | } 110 | 111 | /** 112 | * Method to publish a video. The response will contain the sdpAnswer attribute. 113 | * 114 | * @param sdpOffer is a string sent by the client 115 | * @param doLoopback is a boolean value enabling media loopback 116 | * @param id is an index number to track the corresponding response message to this request. 117 | */ 118 | @SuppressWarnings("unused") 119 | public void sendPublishVideo(String sdpOffer, boolean doLoopback, int id){ 120 | HashMap namedParameters = new HashMap<>(); 121 | namedParameters.put("sdpOffer", sdpOffer); 122 | namedParameters.put("doLoopback", doLoopback); 123 | send("publishVideo", namedParameters, id); 124 | } 125 | 126 | /** 127 | * Method unpublishes a previously published video. 128 | * 129 | * @param id is an index number to track the corresponding response message to this request. 130 | */ 131 | @SuppressWarnings("unused") 132 | public void sendUnpublishVideo(int id){ 133 | send("unpublishVideo", null, id); 134 | } 135 | 136 | /** 137 | * Method represents the client's request to receive media from participants in 138 | * the room that published their media. The response will contain the sdpAnswer attribute. 139 | * 140 | * @param sender is a combination of publisher's name and his currently opened stream 141 | * (usually webcam) separated by underscore. For example: userid_webcam 142 | * @param sdpOffer is the SDP offer sent by this client. 143 | * @param id is an index number to track the corresponding response message to this request. 144 | */ 145 | @SuppressWarnings("unused") 146 | public void sendReceiveVideoFrom(String sender, String streamId, String sdpOffer, int id){ 147 | HashMap namedParameters = new HashMap<>(); 148 | namedParameters.put("sdpOffer", sdpOffer); 149 | namedParameters.put("sender", sender + "_" + streamId); 150 | send("receiveVideoFrom", namedParameters, id); 151 | } 152 | 153 | /** 154 | * Method represents a client's request to stop receiving media from a given publisher. 155 | * Response will contain the sdpAnswer attribute. 156 | * 157 | * @param userId is the publisher's username. 158 | * @param streamId is the name of the stream (typically webcam) 159 | * @param id is an index number to track the corresponding response message to this request. 160 | */ 161 | @SuppressWarnings("unused") 162 | public void sendUnsubscribeFromVideo(String userId, String streamId, int id){ 163 | String sender = userId+"_"+streamId; 164 | HashMap namedParameters = new HashMap<>(); 165 | namedParameters.put("sender", sender); 166 | send("unsubscribeFromVideo", namedParameters, id); 167 | } 168 | 169 | /** 170 | * Method carries the information about the ICE candidate gathered on the client side. 171 | * This information is required to implement the trickle ICE mechanism. 172 | * 173 | * @param endpointName is the username of the peer whose ICE candidate was found 174 | * @param candidate contains the candidate attribute information 175 | * @param sdpMid is the media stream identification, "audio" or "video", for the m-line, 176 | * this candidate is associated with. 177 | * @param sdpMLineIndex is the index (starting at 0) of the m-line in the SDP, 178 | * this candidate is associated with. 179 | */ 180 | @SuppressWarnings("unused") 181 | public void sendOnIceCandidate(String endpointName, String candidate, String sdpMid, String sdpMLineIndex, int id){ 182 | HashMap namedParameters = new HashMap<>(); 183 | namedParameters.put("endpointName", endpointName); 184 | namedParameters.put("candidate", candidate); 185 | namedParameters.put("sdpMid", sdpMid); 186 | namedParameters.put("sdpMLineIndex", sdpMLineIndex); 187 | send("onIceCandidate", namedParameters, id); 188 | } 189 | 190 | /** 191 | * Method sends a message from the user to all other participants in the room. 192 | * 193 | * @param roomId is the name of the room. 194 | * @param userId is the username of the user sending the message. 195 | * @param message is the text message sent to the room. 196 | * @param id is an index number to track the corresponding response message to this request. 197 | */ 198 | @SuppressWarnings("unused") 199 | public void sendMessage(String roomId, String userId, String message, int id){ 200 | HashMap namedParameters = new HashMap<>(); 201 | namedParameters.put("message", message); 202 | namedParameters.put("userMessage", userId); 203 | namedParameters.put("roomMessage", roomId); 204 | send("sendMessage", namedParameters, id); 205 | } 206 | 207 | /** 208 | * Method to send any custom requests that are not directly implemented by the Room server. 209 | * 210 | * @param names is an array of parameter names. 211 | * @param values is an array of parameter values where the index is corresponding with 212 | * the applicable name value in the names array. 213 | * @param id is an index number to track the corresponding response message to this request. 214 | */ 215 | @SuppressWarnings("unused") 216 | public void sendCustomRequest(String[] names, String[] values, int id){ 217 | if(names==null || values==null||names.length!=values.length){ 218 | return; // mismatching name-value pairs 219 | } 220 | HashMap namedParameters = new HashMap<>(); 221 | for(int i=0;i 2 | 3 | 4 | 5 | 6 | KurentoRoomAPI.Method 7 | 8 | 9 | 10 | 11 | 12 | 28 | 31 | 32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 46 |
47 | 89 | 90 | 91 |
92 |
fi.vtt.nubomedia.kurentoroomclientandroid
93 |

Enum KurentoRoomAPI.Method

94 |
95 |
96 |
    97 |
  • java.lang.Object
  • 98 |
  • 99 |
      100 |
    • java.lang.Enum<KurentoRoomAPI.Method>
    • 101 |
    • 102 |
        103 |
      • fi.vtt.nubomedia.kurentoroomclientandroid.KurentoRoomAPI.Method
      • 104 |
      105 |
    • 106 |
    107 |
  • 108 |
109 |
110 |
    111 |
  • 112 |
    113 |
    All Implemented Interfaces:
    114 |
    java.io.Serializable, java.lang.Comparable<KurentoRoomAPI.Method>
    115 |
    116 |
    117 |
    Enclosing class:
    118 |
    KurentoRoomAPI
    119 |
    120 |
    121 |
    122 |
    public static enum KurentoRoomAPI.Method
    123 | extends java.lang.Enum<KurentoRoomAPI.Method>
    124 |
  • 125 |
126 |
127 |
128 |
    129 |
  • 130 | 131 | 159 | 160 |
      161 |
    • 162 | 163 | 164 |

      Method Summary

      165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 176 | 177 | 178 | 179 | 183 | 184 |
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static KurentoRoomAPI.MethodvalueOf(java.lang.String name) 174 |
      Returns the enum constant of this type with the specified name.
      175 |
      static KurentoRoomAPI.Method[]values() 180 |
      Returns an array containing the constants of this enum type, in 181 | the order they are declared.
      182 |
      185 |
        186 |
      • 187 | 188 | 189 |

        Methods inherited from class java.lang.Enum

        190 | compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • 191 |
      192 |
        193 |
      • 194 | 195 | 196 |

        Methods inherited from class java.lang.Object

        197 | getClass, notify, notifyAll, wait, wait, wait
      • 198 |
      199 |
    • 200 |
    201 |
  • 202 |
203 |
204 |
205 |
    206 |
  • 207 | 208 | 260 | 261 |
      262 |
    • 263 | 264 | 265 |

      Method Detail

      266 | 267 | 268 | 269 |
        270 |
      • 271 |

        values

        272 |
        public static KurentoRoomAPI.Method[] values()
        273 |
        Returns an array containing the constants of this enum type, in 274 | the order they are declared. This method may be used to iterate 275 | over the constants as follows: 276 |
        277 | for (KurentoRoomAPI.Method c : KurentoRoomAPI.Method.values())
        278 |     System.out.println(c);
        279 | 
        280 |
        281 |
        Returns:
        282 |
        an array containing the constants of this enum type, in the order they are declared
        283 |
        284 |
      • 285 |
      286 | 287 | 288 | 289 |
        290 |
      • 291 |

        valueOf

        292 |
        public static KurentoRoomAPI.Method valueOf(java.lang.String name)
        293 |
        Returns the enum constant of this type with the specified name. 294 | The string must match exactly an identifier used to declare an 295 | enum constant in this type. (Extraneous whitespace characters are 296 | not permitted.)
        297 |
        298 |
        Parameters:
        299 |
        name - the name of the enum constant to be returned.
        300 |
        Returns:
        301 |
        the enum constant with the specified name
        302 |
        Throws:
        303 |
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        304 |
        java.lang.NullPointerException - if the argument is null
        305 |
        306 |
      • 307 |
      308 |
    • 309 |
    310 |
  • 311 |
312 |
313 |
314 | 315 | 316 |
317 | 318 | 319 | 320 | 321 | 322 | 323 | 330 |
331 | 373 | 374 | 375 | 376 | -------------------------------------------------------------------------------- /javadoc/fi/vtt/nubomedia/kurentoroomclientandroid/KurentoAPI.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | KurentoAPI 7 | 8 | 9 | 10 | 11 | 12 | 28 | 31 | 32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 46 |
47 | 89 | 90 | 91 |
92 |
fi.vtt.nubomedia.kurentoroomclientandroid
93 |

Class KurentoAPI

94 |
95 |
96 |
    97 |
  • java.lang.Object
  • 98 |
  • 99 |
      100 |
    • fi.vtt.nubomedia.kurentoroomclientandroid.KurentoAPI
    • 101 |
    102 |
  • 103 |
104 |
105 |
    106 |
  • 107 |
    108 |
    All Implemented Interfaces:
    109 |
    fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents
    110 |
    111 |
    112 |
    Direct Known Subclasses:
    113 |
    KurentoRoomAPI
    114 |
    115 |
    116 |
    117 |
    public abstract class KurentoAPI
    118 | extends java.lang.Object
    119 | implements fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents
    120 |
    Base class for API classes that handles web socket connections and Json-RPC requests and 121 | responses.
    122 |
  • 123 |
124 |
125 |
126 |
    127 |
  • 128 | 129 |
      130 |
    • 131 | 132 | 133 |

      Constructor Summary

      134 | 135 | 136 | 137 | 138 | 139 | 140 | 144 | 145 |
      Constructors 
      Constructor and Description
      KurentoAPI(fi.vtt.nubomedia.utilitiesandroid.LooperExecutor executor, 141 | java.lang.String uri) 142 |
      Constructor that initializes required instances and parameters for the API calls.
      143 |
      146 |
    • 147 |
    148 | 149 |
      150 |
    • 151 | 152 | 153 |

      Method Summary

      154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 165 | 166 | 167 | 168 | 171 | 172 | 173 | 174 | 177 | 178 | 179 | 180 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 |
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidconnectWebSocket() 163 |
      Opens a web socket connection to the predefined URI as provided in the constructor.
      164 |
      voiddisconnectWebSocket() 169 |
      Attempts to close the web socket connection asynchronously.
      170 |
      booleanisWebSocketConnected() 175 |
      Method to check if the web socket connection is connected.
      176 |
      voidonClose(int code, 181 | java.lang.String reason, 182 | boolean remote) 
      voidonError(java.lang.Exception e) 
      voidonNotification(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcNotification notification) 
      voidonOpen(org.java_websocket.handshake.ServerHandshake handshakedata) 
      voidonRequest(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcRequest request) 
      voidonResponse(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcResponse response) 
      205 |
        206 |
      • 207 | 208 | 209 |

        Methods inherited from class java.lang.Object

        210 | equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 211 |
      212 |
    • 213 |
    214 |
  • 215 |
216 |
217 |
218 |
    219 |
  • 220 | 221 |
      222 |
    • 223 | 224 | 225 |

      Constructor Detail

      226 | 227 | 228 | 229 |
        230 |
      • 231 |

        KurentoAPI

        232 |
        public KurentoAPI(fi.vtt.nubomedia.utilitiesandroid.LooperExecutor executor,
        233 |                   java.lang.String uri)
        234 |
        Constructor that initializes required instances and parameters for the API calls. 235 | WebSocket connections are not established in the constructor. User is responsible 236 | for opening, closing and checking if the connection is open through the corresponding 237 | API calls.
        238 |
        239 |
        Parameters:
        240 |
        executor - is the asynchronous UI-safe executor for tasks.
        241 |
        uri - is the web socket link to the room web services.
        242 |
        243 |
      • 244 |
      245 |
    • 246 |
    247 | 248 |
      249 |
    • 250 | 251 | 252 |

      Method Detail

      253 | 254 | 255 | 256 |
        257 |
      • 258 |

        connectWebSocket

        259 |
        public void connectWebSocket()
        260 |
        Opens a web socket connection to the predefined URI as provided in the constructor. 261 | The method responds immediately, whether or not the connection is opened. 262 | The method isWebSocketConnected() should be called to ensure that the connection is open.
        263 |
      • 264 |
      265 | 266 | 267 | 268 |
        269 |
      • 270 |

        isWebSocketConnected

        271 |
        public boolean isWebSocketConnected()
        272 |
        Method to check if the web socket connection is connected.
        273 |
        274 |
        Returns:
        275 |
        true if the connection state is connected, and false otherwise.
        276 |
        277 |
      • 278 |
      279 | 280 | 281 | 282 |
        283 |
      • 284 |

        disconnectWebSocket

        285 |
        public void disconnectWebSocket()
        286 |
        Attempts to close the web socket connection asynchronously.
        287 |
      • 288 |
      289 | 290 | 291 | 292 |
        293 |
      • 294 |

        onOpen

        295 |
        public void onOpen(org.java_websocket.handshake.ServerHandshake handshakedata)
        296 |
        297 |
        Specified by:
        298 |
        onOpen in interface fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents
        299 |
        300 |
      • 301 |
      302 | 303 | 304 | 305 |
        306 |
      • 307 |

        onRequest

        308 |
        public void onRequest(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcRequest request)
        309 |
        310 |
        Specified by:
        311 |
        onRequest in interface fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents
        312 |
        313 |
      • 314 |
      315 | 316 | 317 | 318 |
        319 |
      • 320 |

        onResponse

        321 |
        public void onResponse(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcResponse response)
        322 |
        323 |
        Specified by:
        324 |
        onResponse in interface fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents
        325 |
        326 |
      • 327 |
      328 | 329 | 330 | 331 |
        332 |
      • 333 |

        onNotification

        334 |
        public void onNotification(fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcNotification notification)
        335 |
        336 |
        Specified by:
        337 |
        onNotification in interface fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents
        338 |
        339 |
      • 340 |
      341 | 342 | 343 | 344 |
        345 |
      • 346 |

        onClose

        347 |
        public void onClose(int code,
        348 |                     java.lang.String reason,
        349 |                     boolean remote)
        350 |
        351 |
        Specified by:
        352 |
        onClose in interface fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents
        353 |
        354 |
      • 355 |
      356 | 357 | 358 | 359 |
        360 |
      • 361 |

        onError

        362 |
        public void onError(java.lang.Exception e)
        363 |
        364 |
        Specified by:
        365 |
        onError in interface fi.vtt.nubomedia.jsonrpcwsandroid.JsonRpcWebSocketClient.WebSocketConnectionEvents
        366 |
        367 |
      • 368 |
      369 |
    • 370 |
    371 |
  • 372 |
373 |
374 |
375 | 376 | 377 |
378 | 379 | 380 | 381 | 382 | 383 | 384 | 391 |
392 | 434 | 435 | 436 | 437 | --------------------------------------------------------------------------------