Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.inspiraluna:AppRTC-Android:2.08'
}
dependencies {
implementation("com.github.inspiraluna:AppRTC-Android:2.08")
}
<dependency>
<groupId>com.github.inspiraluna</groupId>
<artifactId>AppRTC-Android</artifactId>
<version>2.08</version>
</dependency>
libraryDependencies += "com.github.inspiraluna" % "AppRTC-Android" % "2.08"
:dependencies [[com.github.inspiraluna/AppRTC-Android "2.08"]]
##About This project is a open source Android webrtc video chat which can be easily integrated in any website. E.g. you can add improve your customer support by adding this widget to your website.
##Documentation This WebRTC Android App simply connects to a Java Webrtc Signaling Server via Websocket Protokoll and lists connected users which can be called via Videophone. It is a WebRTC ready prototype for integration into other apps which want to implement WebRTC Videocalls e.g. for their Sales and Support team.
##Installation 1. git clone this repository and open it in Android Studio 2. AppRTC-Kurento (Signaling Server) must be running already 3. STUN-TURN Server should be running, if you run the project outside your local LAN. 4. connect your Android phone via USB and deploy and start android app from Android Studio 5. in the app settings (top right corner of the running app) - change the Websocket-URL according to the URL of your signaling server e.g. wss://webrtcsignaling-server/jWebrtc (secure websocket - wss:// insecure with ws:// ) you can change the default values in strings.xml ```<string name="pref_room_server_url_default" translatable="false">wss://nicokrause.com/jWebrtc</string>`` - enter your favourite username which should register on signaling server and should be visible and reachable by the peers 6. open chrome and/or android browser to https://webrtcsignaling-server/jWebrtc and register another user 7. choose a registered user on phone or browser and call.
##Code-Instructions
the apps main activities are: ConnectActivity - the main screen - displays connected users CallActivity - the screen which has the video and their controls
all websocket communication is done in WebsocketChannelClient - creates, connects, registeres and closes the websocket to SignalingServer WebsocketRTCClient - receives WebRTC - signaling messages and handles them accordingly
WebRTC peerconnection is done in PeerConnectionClient
##Common Mistakes
##Todo/Bugs
<iframe /> or <script>
#Improvements and Research
wake up certain user when offline (if app was started can be seen if use is online now)
security check BEAST attack on production server (TEST SSL) https://www.ssllabs.com/ssltest/analyze.html?d=webrtc.a-fk.de&latest
Test necessary: don't let android go into idle mode during a call (who can test this in Android 5.0)
##possible tweaks
##Nice2Have
##Tests
##Done:
03.02.2017 - added library to github / jitpack.io - creating and sharing an own android library (blog) https://mayojava.github.io/android/library/creating-and-distributing-your-own-android-library/ - JitPack.Io https://jitpack.io https://jitpack.io/#inspiraluna/AppRTC-Android/2.01 - android-gradle-maven-plugin https://github.com/dcendents/android-maven-gradle-plugin - some stackoverflow answers http://stackoverflow.com/questions/33058358/jitpack-io-failed-to-resolve-github-repo/33059275#33059275 - Git-SubModules - https://git-scm.com/book/en/v2/Git-Tools-Submodules
13.01.2017 - add msc-webrtc library to msc-android project
01.12.2016 - (screensharing) if android calls browser - browse cannot start screensharing (initiater - offer problem)
01.12.2016 - (screensharing) remote hangup does not switches back to video screen
20.09.2016 - fixed bug: new secure websocket crashes / disconnects / error on tomcat but works on glassfish - tomcat problem? Check if server is working correctly: - https://cryptoreport.thawte.com/checker/views/certCheck.jsp ok - http://www.websocket.org/echo.html
16.9.2016 - websocket in wss mode (secure) autobahn does work or not? tried: https://github.com/palmerc/SecureWebSockets (from: https://github.com/crossbario/autobahn-android/pull/14) - tomcat crashes https://github.com/TooTallNate/Java-WebSocket https://github.com/TooTallNate/Java-WebSocket/issues/141 http://www.juliankrone.com/connect-and-transfer-data-with-secure-websockets-in-android/