.. java:import:: at.jumpch.utils JCAudioManager .. java:import:: at.jumpch.utils Log .. java:import:: io.socket SocketIO .. java:import:: io.socket IOCallback .. java:import:: io.socket IOAcknowledge .. java:import:: io.socket SocketIOException .. java:import:: org.apache.http.client HttpClient .. java:import:: org.apache.http.client ResponseHandler .. java:import:: org.apache.http.client.methods HttpGet .. java:import:: org.apache.http.impl.client BasicResponseHandler .. java:import:: org.apache.http.impl.client DefaultHttpClient .. java:import:: org.json JSONArray .. java:import:: org.json JSONException .. java:import:: org.json JSONObject .. java:import:: org.webrtc AudioSource .. java:import:: org.webrtc AudioTrack .. java:import:: org.webrtc DataChannel .. java:import:: org.webrtc IceCandidate .. java:import:: org.webrtc MediaConstraints .. java:import:: org.webrtc MediaStream .. java:import:: org.webrtc MediaStreamTrack .. java:import:: org.webrtc PeerConnection .. java:import:: org.webrtc PeerConnectionFactory .. java:import:: org.webrtc SdpObserver .. java:import:: org.webrtc SessionDescription .. java:import:: org.webrtc VideoCapturer .. java:import:: org.webrtc VideoCapturerAndroid .. java:import:: org.webrtc VideoSource .. java:import:: org.webrtc VideoTrack .. java:import:: android.app Activity .. java:import:: android.content Context .. java:import:: android.content Intent .. java:import:: android.graphics Bitmap .. java:import:: android.graphics BitmapFactory .. java:import:: android.graphics PixelFormat .. java:import:: android.graphics Point .. java:import:: android.hardware.display DisplayManager .. java:import:: android.hardware.display VirtualDisplay .. java:import:: android.media Image .. java:import:: android.media ImageReader .. java:import:: android.media.projection MediaProjection .. java:import:: android.media.projection MediaProjectionManager .. java:import:: android.os Build .. java:import:: android.os Handler .. java:import:: android.os SystemClock .. java:import:: android.util Base64 .. java:import:: android.util DisplayMetrics .. java:import:: android.view Display .. java:import:: android.view WindowManager .. java:import:: java.io ByteArrayOutputStream .. java:import:: java.io UnsupportedEncodingException .. java:import:: java.net URL .. java:import:: java.nio ByteBuffer .. java:import:: java.nio.charset Charset .. java:import:: java.util ArrayList .. java:import:: java.util HashMap .. java:import:: java.util List .. java:import:: java.util Map .. java:import:: java.util Random .. java:import:: java.util UUID .. java:import:: java.util.regex Matcher .. java:import:: java.util.regex Pattern .. java:import:: javax.net.ssl SSLContext JCClient.Callback ================= .. java:package:: at.jumpch.sdk :noindex: .. java:type:: public interface Callback :outertype: JCClient JumpChat callback interface for JCClient. Application should implement this interface to provide to the \ :java:ref:`JCClient`\ constructor. Methods ------- onDCBroadcastState ^^^^^^^^^^^^^^^^^^ .. java:method:: void onDCBroadcastState(String userid, Boolean video, Boolean audio) :outertype: JCClient.Callback Received a user broadcasting a state change. :param userid: User id of the state change :param video: \ ``true``\ if video is available, \ ``false``\ otherwise :param audio: \ ``true``\ if audio is available, \ ``false``\ otherwise onDCDataMessage ^^^^^^^^^^^^^^^ .. java:method:: void onDCDataMessage(String userid, JSONObject msg) :outertype: JCClient.Callback Received a custom data message from user. :param userid: User id of the sender :param msg: JSON object of the message onDCJoined ^^^^^^^^^^ .. java:method:: void onDCJoined(String userid) :outertype: JCClient.Callback Called when a user has joined. :param userid: User id of person joining the room onDCTextMessage ^^^^^^^^^^^^^^^ .. java:method:: void onDCTextMessage(String userid, String msg) :outertype: JCClient.Callback Received a text message from a user. :param userid: User id of the sender :param msg: Text message sent onDCUpdateAvatar ^^^^^^^^^^^^^^^^ .. java:method:: void onDCUpdateAvatar(String userid, Bitmap avatar) :outertype: JCClient.Callback Received a user avatar change. :param userid: User id of the avatar change :param avatar: Updated avatar onDCUpdateName ^^^^^^^^^^^^^^ .. java:method:: void onDCUpdateName(String userid, String name) :outertype: JCClient.Callback Received a user name change. :param userid: User id of the name change :param name: Updated name of the user onJoinFailed ^^^^^^^^^^^^ .. java:method:: void onJoinFailed(String roomName) :outertype: JCClient.Callback Called when joining a room fails. :param roomName: Name of the room onJoined ^^^^^^^^ .. java:method:: void onJoined() :outertype: JCClient.Callback Called when user successfully joins a room. onKicked ^^^^^^^^ .. java:method:: void onKicked() :outertype: JCClient.Callback Called when admin has kicked the user. onKnocking ^^^^^^^^^^ .. java:method:: void onKnocking(String sessid, String msg) :outertype: JCClient.Callback Called when someone is knocking to request joining a room. :param sessid: Session id describing the user knocking :param msg: Message that can be displayed created by the user knocking onRoomCreated ^^^^^^^^^^^^^ .. java:method:: void onRoomCreated(String roomName) :outertype: JCClient.Callback Called when a room create request is processed. :param roomName: Name of the created room onRoomInfoUpdated ^^^^^^^^^^^^^^^^^ .. java:method:: void onRoomInfoUpdated() :outertype: JCClient.Callback Called when the room information has been updated. For example, when someone is knocking on the room. This is only called when user is the admin. onSetVideoSize ^^^^^^^^^^^^^^ .. java:method:: void onSetVideoSize(String userid, String videoid, int width, int height) :outertype: JCClient.Callback Called when the video size of a stream changes. :param userid: User id of the video owner :param videoid: Video id of the change stream :param width: Updated width of the stream :param height: Updated height of the stream onSocketError ^^^^^^^^^^^^^ .. java:method:: void onSocketError(Exception e) :outertype: JCClient.Callback Called when the server connection fails. :param e: Exception describing the error onUsersUpdated ^^^^^^^^^^^^^^ .. java:method:: void onUsersUpdated() :outertype: JCClient.Callback Called when someone joins or leaves the room. onVersionCheck ^^^^^^^^^^^^^^ .. java:method:: void onVersionCheck(String version) :outertype: JCClient.Callback Called after a version check query is done for the client. :param version: Version returned. Empty string if version check failed. onVideoAdded ^^^^^^^^^^^^ .. java:method:: void onVideoAdded(String userid, String videoid, JCVideoView view) :outertype: JCClient.Callback Called when a video of a user is added. :param userid: User id of the owner of the video :param videoid: Unique video id :param view: Video view onVideoRemoved ^^^^^^^^^^^^^^ .. java:method:: void onVideoRemoved(String userid, String videoid) :outertype: JCClient.Callback Called when a video of a user is removed. :param userid: User id of the owner of the video :param videoid: Unique video id