Skip to content

NiKrause/AppRTC-Android

 
 

Repository files navigation

AppRTCDemo - Android

##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 ```wss://nicokrause.com/jWebrtc``
    • 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

  • (production) wrong url for webservice.
  • (development) smartphone not in same network as browser, media kurento server
  • (development) kurento server not running?

##Todo/Bugs

  • when receiving "rejected" do not send channelclose to other party and display reject message"
  • display my userId
  • display status for connection (connecting,online,error)
  • generate code for blog <iframe /> or <script>

#Improvements and Research

##possible tweaks

##Nice2Have

  • (p3) add "audio call" and "video call" button
  • (p3) add "answer with audio" and answer "answer with video" button during incoming call

##Tests

  • Handsfree speaker test switch with earpiece
  • (not tested yet) does app go in stand by mode during video broadcast
  • (not tested yet) test reconnect when app goes offline or wifi off (see also: palmerc/SecureWebSockets#13)
  • (ok) test socket stays connected in background mode.

##Done:

About

Android AppRTC working with Kurento

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%