Minimalist and extensible Android Client signaling framework for multi-party Real-Time applications
Include protoo-client-android
into your project, for example, as a Gradle compile dependency:
implementation 'org.protoojs.droid:protoo-client:4.0.3'
- implement your own
WebSocketTransport
public class WebSocketTransport extends AbsWebSocketTransport {
// ...
}
protoo-client-android
just define a base classAbsWebSocketTransport
which offer opportunity to implement your ownWebSocketTransport
- creates a WebSocket connection
WebSocketTransport transport = new WebSocketTransport("wss://example.org");
- create a participant in a remote room
private Peer.Listener peerListener =
new Peer.Listener() {
// ...
};
mPeer = new Peer(transport, peerListener);
- send request or notify
Once connected to remote server Peer.Listener#onOpen
will be called, then you can call
Peer#request
or Peer#notify
to send message to server.
mPeer.request("dummy", ...);
mPeer.notify("dummy", ...);
Haiyang Wu(@haiyangwu at Github)