Android Java client sample

An Android client written in Java.

Building the client



The current configuration values are as follows:

    public static String signalingServer = "http://localhost:3001";
    public static String turnServer = "turn:turn:turnserveruri:5349";
    public static String username = "user";
    public static String credential = "password";
    public static PeerConnection.TlsCertPolicy tlsCertPolicy = PeerConnection.TlsCertPolicy.TLS_CERT_POLICY_SECURE;

With the exception of tlsCertPolicy these map directly to webrtcConfig options, as follows:

uniquely for tlsCertPolicy, we allow the caller to configure how the underlying tls library will verify certificates. This supports the following values:

How it works

Once the config settings are changed, the client will require a server to connect to. In this toolkit, we have a few Sample Servers.

When both the client and server are connected to the same signaling server, they will appear in the peer list.

You can initiate the connection using the client or server, simply select the peer from the list and press join. That will start the video streaming and you can use the above controls to move the camera around the scene.