SkylinkSDK for Android 2.0 features Screen sharing functionality as well as an upgrade to libWebRTC.

Getting Started GuideDocumentation


What's New


Media: Create, Remove

  • Local media is now started independently of connecting to the room.
  • Able to now start local media for Screen.
  • Able to now start local media using a user provided video capturer implementation and specific media resolution
  • Disconnecting from room no longer disposes of local media.
  • User can call the destroyLocalMedia API to dispose of a specific local Media
  • Users can call the clearInstance API to clear all media and all skylinkConnection properties
  • A new config property with the methods: isMultitrackCreateEnable() and setMultitrackCreateEnable to enable multi media creation has been added


Media: Modify

  • Modify local media by providing a media id, support mute/unmute for audio and video, start/stop for video and screen share.


Media: State

  • Media state has 4 options: ACTIVE, MUTED, STOPPED, UNAVAILABLE



Media: Get

  • Get the specific SkylinkMedia object by media id or get a list of media objects by media type and peer id, including local media objects and remote media objects
  • Able to get all available media device names, current video device, current capture format and all supported capture formats.


Media: permission

  • Added new methods onRequirePermission, onGrantPermission and onDenyPermission to get permission for screen capturing


Media: Video Resolutions

  • Video resolutions are now returned in 2 ways. They can be returned manually via the method callback while automatic reports can be returned in the MediaListener

  • Get input and received video resolution by media id, get sent video resolution by media id and remote peer id

  • Set input video resolution by media id
  • New method setEnableVideoHwAcceleration to allow video codec hardware acceleration
  • DEFAULT_VIDEO_FPS has replaced MAX_VIDEO_FPS 
  • The property reportVideoResolutionOnChange to activate auto reporting of video resolution has been replaced by 2 different properties reportVideoResolutionOnVideoChange and reportVideoResolutionUntilStable.


Room: connect/disconnect

  • Connecting to room will not, on its own, activate any media.
  • Disconnecting from room will not remove any existing media. The user can directly reconnect to the room with existing media.
  • The room connection listener/delegate method has been separated into two different methods, one for successful connection, and one for failure to connect.
  • Set properties reconnectAttempts and reconnectionDelay in SkylinkConfig to set the SDK's automatic reconnection to a room if it fails to connect or gets disconnected due to unexpected reasons (e.g. network errors).
  • A new property SocketTransport has been added for users to set the preferred socket transport to connect to the room.

SkylinkConnection: init

  • Properties in SkylinkConfig need to be set before initialising the SkylinkConnection. After SkylinkConnection is initialised, any subsequent config setting will be discarded.
  • init method for the SkylinkConnection instance no longer requires appKey


Room: Information

  • Method setEnableLogs to enable detailed SDK logging now falls under the SkylinkConnection class, not SkylinkConfig
  • onReceiveLog and onWarning have been deprecated. Please use onReceiveInfo, onReceiveWarning and onReceiveError instead.
  • New enum NetworkTransport for setting/getting networkTransport, and SkylinkAction for setting/getting timeout.
  • New enum SkylinkRoomSize to set the room size with the below options has been added. It is recommended to set this on SkylinkConfig. These sizes correspond to the following number of users:
  • EXTRA_SMALL: Up to 2 users
  • SMALL: Up to 4 users
  • MEDIUM: Up to 5 users
  • LARGE: Up to 8 users
  • EXTRA_LARGE: Currently defaults to LARGE capacity (Up to 8 users). Increased capacity will be available with a future version.


User

  • When connecting/disconnecting with a remote peer, new callbacks onReceiveRemotePeerJoinRoom, onReceiveRemotePeerLeaveRoom, onConnectWithRemotePeer and onDisconnectWithRemotePeer have been added for notifying the connection/ disconnection of a remote peer to/from a room and  the connection/ disconnection of a remote peer to/from the other peers  respectively. These have replaced the functionality of the previous callbacks onRemotePeerJoin and onRemotePeerLeft.
  • Video resolution properties are no longer stored under UserInfo and can now be retrieved via media id from getInputVideoResolution, getReceivedVideoResolution and getSentVideoResolution

  • Media configuration (setVideoSend/setAudioSend) has been moved to SkylinkConfig

  • Media states like audioMuted/videoMuted now belong to the SkylinkMedia object. These cannot be obtained from the UserInfo class
  • The method getUserData has been deprecated and replaced with getUserInfo(String peerId).getUserData().


FileTransfer

  • The APIs for accepting and rejecting a file transfer have been separated into: acceptFileTransfer and rejectFileTransfer respectively.


Statistics

  • StatsListener has been removed, since the stats are outputted in the method callback itself


Recording

  • Recorded video links will now only be sent directly to the registered email on the Temasys console. This Notification Email can be configured on the Recording Configuration tab under Account Settings.


Errors/ Warnings

  •   Added new classes/enums SkylinkEvent, SkylinkError, SkylinkInfo for improved error/warning specification


Bug-Fixes

  • Fixed a camera access bug observed when the device only has 1 camera. 
  • Fixed a bug which prevents connection to remote peers if a Peer joins with NO_AUDIO_NO_VIDEO for both send and receive configs in an MCU enabled room.


Known Issues

  • The H264 video codec(both baseline and high profile) cannot be used on devices whose hardware does not support the codec or in cases where the device does not use a Qualcomm or EXYNOS processor.
  • The screen share capturer only capture the active screen, which may cause black screens for the remote side when the shared screen is not active or goes into the background mode.
  • It is not currently possible to specifically return the video resolution for camera and screen if both media are active at the same time. I.e., trying to get video resolution for camera might return video resolution for screen instead. This is not an issue if only 1 video source is present.
  • Automatic reconnect to room might not currently work for SMR (MCU) enabled rooms.


General changes

  • Changes have been made to the names and parameters of multiple Public APIs, as reflected in the tables below.


Old API and Parameters
New API and Parameters

public boolean toggleCamera()

public boolean toggleCamera(boolean restart)

public void muteLocalAudio(boolean isMuted)

public void muteLocalVideo(boolean isMuted)


public void changeLocalMediaState(String mediaId, @NonNull final MediaState mediaState, SkylinkCallback errorCallback)

public void switchCamera()

public void switchCamera(SkylinkCallback errorCallback)

public SkylinkCaptureFormat getCaptureFormat()

public SkylinkCaptureFormat[] getCaptureFormats(SkylinkConfig.VideoDevice videoDevice)


public SkylinkCaptureFormat getCurrentCaptureFormat()

public SkylinkCaptureFormat[] getAllCaptureFormats(SkylinkConfig.VideoDevice videoDevice)

public void setInputVideoResolution(int width, final int height, final int fps)

public void setInputVideoResolution(@NonNull final String mediaId, final int width, final int height, final int fps, SkylinkCallback errorCallback)

public boolean startRecording()

public boolean stopRecording()

public void startRecording(SkylinkCallback errorCallback)

public void stopRecording(SkylinkCallback errorCallback)

public void sendP2PMessage(String remotePeerId, Object message) throws SkylinkException

public void sendP2PMessage(Object message, String remotePeerId, SkylinkCallback errorCallback)

public void sendServerMessage(String remotePeerId, Object message)

public void sendServerMessage(Object message, String remotePeerId, SkylinkCallback errorCallback)

public void sendFileTransferPermissionRequest(String remotePeerId, String fileName, String filePath) throws SkylinkException

public void sendFileTransfer(String filePath, String fileName, String remotePeerId, SkylinkCallback errorCallback)


public void sendFileTransferPermissionResponse(String remotePeerId, String filePath, boolean isPermitted) throws SkylinkException

public void acceptFileTransfer(String filePath, @NonNull String remotePeerId, SkylinkCallback errorCallback)

public void rejectFileTransfer(@NonNull String remotePeerId, SkylinkCallback errorCallback)

public void sendData(String remotePeerId, byte[] data) throws SkylinkException

public void sendData(byte[] data, String remotePeerId, SkylinkCallback errorCallback)

public boolean connectToRoom(final String secret, final String roomName, final Object userData)

public boolean connectToRoom(final String skylinkConnectionString, final Object userData)

public void connectToRoom(@NonNull final String appKey, @NonNull final String secret, @NonNull final String roomName, final Object userData, SkylinkCallback errorCallback)

public void connectToRoom(@NonNull final String skylinkConnectionString, final Object userData, SkylinkCallback errorCallback)

public boolean disconnectFromRoom()

public void disconnectFromRoom(SkylinkCallback errorCallback)

public void lockRoom()

public void unlockRoom()

public void lockRoom(SkylinkCallback errorCallback)

public void unlockRoom(SkylinkCallback errorCallback)

public String getPeerId()

public String getLocalPeerId()

public void sendLocalUserData(Object userData)

public void sendLocalUserData(Object localUserData, SkylinkCallback errorCallback)
public String[] refreshConnection(String remotePeerId, boolean iceRestart)public void refreshConnection(String remotePeerId, boolean doIceRestart, SkylinkCallback errorCallback)
public void init(final String appKey, final SkylinkConfig config, Context applicationContext)public void init(@NonNull final SkylinkConfig config, @NonNull Context applicationContext, SkylinkCallback errorCallback)



Old Listener/Delegate interfaces
New Listener/Delegate interfaces

public void onLocalMediaCapture(SurfaceViewRenderer videoView)

public void onRemotePeerMediaReceive(String remotePeerId, SurfaceViewRenderer videoView)

public void onCreateLocalMedia(SkylinkMedia localMedia)

public void onReceiveRemoteMedia(SkylinkMedia remoteMedia, String remotePeerId)

public void onRemotePeerAudioToggle(String remotePeerId, boolean isMuted)

public void onRemotePeerVideoToggle(String remotePeerId, boolean isMuted);

public void onChangeRemoteMedia(SkylinkMedia remoteMedia, String remotePeerId)

public void onInputVideoResolutionObtained(int width, int height, int fps,
SkylinkCaptureFormat captureFormat)

public void onReceivedVideoResolutionObtained(String peerId, int width, int height, int fps)

public void onSentVideoResolutionObtained(String peerId, int width, int height, int fps)

public void onObtainInputVideoResolution(int width, int height, int fps, SkylinkCaptureFormat captureFormat, String mediaId)

public void onObtainReceivedVideoResolution(int width, int height, int fps, String mediaId, String remotePeerId)

public void onObtainSentVideoResolution(int width, int height, int fps, String mediaId, String remotePeerId)

public void onVideoSizeChange(String peerId, Point size)

public void onChangeVideoSize(Point videoSize, SkylinkMedia media, String peerId)

public void onRecordingStart(String recordingId)

public void onRecordingStop(String recordingId)


public void onRecordingError(String recordingId, int errorCode, String description)

public void onStartRecording(String recordingId)

public void onStopRecording(String recordingId)

public void onReceiveRecordingError(int errorCode, String description, String recordingId)

public void onServerMessageReceive(String remotePeerId, Object message, boolean isPrivate)

public void onReceiveServerMessage(Object message, boolean isPublic, String remotePeerId)

public void onP2PMessageReceive(String remotePeerId, Object message, boolean isPrivate)

public void onReceiveP2PMessage(Object message, boolean isPublic, String remotePeerId)

public void onDataReceive(String remotePeerId, byte[] data)

public void onReceiveData(byte[] data, String remotePeerId)

public void onFileTransferPermissionRequest(String remotePeerId, String fileName, boolean isPrivate)

public void onFileTransferPermissionResponse(String remotePeerId, String fileName, boolean isPermitted)

public void onFileTransferDrop(String remotePeerId, String fileName, String message, boolean isExplicit)

public void onFileSendComplete(String remotePeerId, String fileName)

public void onFileReceiveComplete(String remotePeerId, String fileName)

public void onFileSendProgress(String remotePeerId, String fileName, double percentage)

public void onFileReceiveProgress(String remotePeerId, String fileName, double percentage)

public void onReceiveFileTransferRequest(String fileName, boolean isPublic, String remotePeerId)

public void onReceiveFileTransferResponse(boolean wasAccepted, String fileName, String remotePeerId)

public void onDropFileTransfer(String fileName, String message, boolean isExplicit, String remotePeerId)

public void onCompleteFileTransferSending(String fileName, String remotePeerId)

public void onCompleteFileTransferReceiving(String fileName, String remotePeerId)

public void onUpdateFileTransferSendingProgress(double percentage, String fileName, String remotePeerId)

public void onUpdateFileTransferReceivingProgress(double percentage, String fileName, String remotePeerId)

public void onConnect(boolean isSuccessful, String message)


public void onDisconnect(int errorCode, String message)

public void onConnectToRoomSuccessful()

public void onConnectToRoomFailed(String errorMessage)

public void onDisconnectFromRoom(SkylinkEvent skylinkEvent, String contextDescription)

public void onReceiveLog(int infoCode, String message)

public void onReceiveInfo(SkylinkInfo skylinkInfo, HashMap<String, Object> details)

public void onWarning(int errorCode, String message)

public void onReceiveWarning(SkylinkError skylinkError, HashMap<String, Object> details)

public void onLockRoomStatusChange(String remotePeerId, boolean lockStatus)

public void onChangeRoomLockStatus(boolean roomLockStatus, String peerId)

public void onRemotePeerJoin(String remotePeerId, Object userData, boolean hasDataChannel)

public void onConnectWithRemotePeer(String remotePeerId, UserInfo userInfo, boolean hasDataChannel)

public void onReceiveRemotePeerJoinRoom(String remotePeerId, UserInfo userInfo)

public void onRemotePeerConnectionRefreshed(String remotePeerId, Object userData, boolean hasDataChannel, boolean wasIceRestarted)

public void onRefreshRemotePeerConnection(String remotePeerId, UserInfo userInfo, boolean hasDataChannel, boolean isIceRestarted)

public void onRemotePeerUserDataReceive(String remotePeerId, Object userData)

public void onReceiveRemotePeerUserData(Object userData, String remotePeerId)

public void onOpenDataConnection(String remotePeerId)

public void onOpenRemotePeerDataConnection(String remotePeerId)

public void onRemotePeerLeave(String remotePeerId, String message, UserInfo userInfo)

public void onDisconnectWithRemotePeer(String remotePeerId, UserInfo userInfo, boolean hasDataChannel)

public void onReceiveRemotePeerLeaveRoom(String remotePeerId, SkylinkInfo skylinkInfo, UserInfo userInfo)

public void onTransferSpeedReceived(String peerId, String mediaId, int mediaDirection, int mediaType, double transferSpeed)


public void onWebrtcStatsReceived(String peerId, String mediaId, int mediaDirection, int mediaType, HashMap<String, String> stats)

Received in getTransferSpeeds callback.

Received in getWebRtcStats callback.

public void onPermissionRequired(String[] permissions, int requestCode, int infoCode)

public void onRequirePermission(String[] permissions, int requestCode, SkylinkInfo skylinkInfo)

public void onPermissionGranted(String[] permissions, int requestCode, int infoCode)

public void onGrantPermission(String[] permissions, int requestCode, SkylinkInfo skylinkInfo)

public void onPermissionDenied(String[] permissions, int requestCode, int infoCode)

public void onDenyPermission(String[] permissions, int requestCode, SkylinkInfo skylinkInfo)


Old Config APIs
New Config APIs

public boolean hasPeerMessaging()

public boolean hasP2PMessaging()

public void setHasPeerMessaging(boolean peerMessaging)

public void setP2PMessaging(boolean hasPeerMessaging)

public void setHasFileTransfer(boolean fileTransfer)

public void setFileTransfer(boolean hasFileTransfer)

public void setHasDataTransfer(boolean dataTransfer)

public void setDataTransfer(boolean hasDataTransfer)

public boolean isAudioAutoGainControl()

public boolean hasAudioAutoGainControl()

public void setAudioAutoGainControl(boolean audioAutoGainControl)

public void setAudioAutoGainControl(boolean hasAudioAutoGainControl)

public boolean isAudioEchoCancellation()

public boolean hasAudioEchoCancellation()

public void setAudioEchoCancellation(boolean audioEchoCancellation)

public void setAudioEchoCancellation(boolean hasAudioEchoCancellation)

public boolean isAudioHighPassFilter()

public boolean hasAudioHighPassFilter()

public void setAudioHighPassFilter(boolean audioHighPassFilter)

public void setAudioHighPassFilter(boolean hasAudioHighPassFilter)

public boolean isAudioNoiseSuppression()

public boolean hasAudioNoiseSuppression()

public setAudioNoiseSuppression(boolean audioNoiseSuppression)

public setAudioNoiseSuppression(boolean hasAudioNoiseSuppression)

public boolean isAudioStereo()

public boolean hasAudioStereo()

public void setAudioStereo(boolean audioStereo)

public void setAudioStereo(boolean hasAudioStereo)
public boolean isMirrorLocalView()


public boolean isMirrorLocalFrontCameraView()

public void setMirrorLocalView(boolean mirrorLocalView)

public void setMirrorLocalFrontCameraView(boolean mirrorLocalView)

public static final int MAX_VIDEO_FPS = 30;

public static final int DEFAULT_VIDEO_FPS = 30;

public int getVideoHeight()
public int getVideoWidth()
public int getVideoFps()

public int getDefaultVideoHeight()
public int getDefaultVideoWidth()
public int getDefaultVideoFps()

public void setVideoHeight(int videoHeight)
public void setVideoWidth(int videoWidth)
public void setVideoFps(int videoFps)

public void setDefaultVideoHeight(int videoHeight)
public void setDefaultVideoWidth(int videoWidth)
public void setDefaultVideoFps(int videoFps)

public boolean isReportVideoResolutionOnChange()

public boolean isReportVideoResolutionOnVideoChange()

public void setReportVideoResolutionOnChange(boolean reportVideoResolutionOnChange)

public void setReportVideoResolutionOnVideoChange(boolean report)

public String getTransport()

public NetworkTransport getNetworkTransport()

public void setTransport(String transport) throws SkylinkException

public void setNetworkTransport(NetworkTransport networktransport) throws SkylinkException

public boolean isEnableLogs()

move to SkylinkConnection API
public void setEnableLogs(boolean enableLogs)move to SkylinkConnection API
public int getMaxPeers()

public int getMaxRemotePeersConnected(AudioVideoConfig roomAudioVideoConfig)

public void setMaxPeers(int maxPeers)

public void setMaxRemotePeersConnected(int maxPeersConnected, AudioVideoConfig roomAudioVideoConfig)

public int getTimeout()

public void setTimeout(int timeout)

public int getTimeout(SkylinkAction skylinkAction)

public void setTimeout(SkylinkAction skylinkAction, int timeout)