IoT SDK for Android v1.8.0
IoT SDK for Android v1.8.0

AgoraRtcService class

Method Description
getVersion Gets the SDK version.
errToStr Converts an error code to a string.
licenseGenCredential Generates a credential, which is a unique device identifier.
licenseVerify Authenticates the SDK license.
init Initializes the SDK.
setLogLevel Sets the log level.
createConnection Creates a connection.
destroyConnection Destroys a connection.
configLog Configures the log file.
joinChannel Joins an RTC channel corresponding to a specified connection.
renewToken Renews an RTC token for one or multiple channels corresponding to a connection.
sendAudioData Sends an audio frame to one or multiple channels corresponding to a connection.
sendVideoData Sends a video frame to one or multiple channels corresponding to a connection.
muteLocalAudio Enables/disables sending local audio data to one or multiple channels corresponding to a connection.
muteRemoteAudio Enables/disables receiving remote audio data from one or multiple channels corresponding to a connection.
muteLocalVideo Enables/disables sending local video data to one or multiple channels corresponding to a connection.
muteRemoteVideo Enables/disables receiving remote video data from one or multiple channels corresponding to a connection.
requestVideoKeyFrame Requests a keyframe from a remote user in one or multiple channels corresponding to a connection.
setBweParam Sets network bandwidth estimation (BWE) parameters.
leaveChannel Leaves an RTC channel corresponding to a specified connection.
fini Releases all resources allocated by the SDK.
loginRtm Logs into RTM.
logoutRtm Logs out of RTM.
sendRtm Sends an RTM message.
setParams Provides technical preview functionalities or special customizations by configuring the SDK with JSON options.

Callbacks

Callback Description
onJoinChannelSuccess Occurs when the local user joins an RTC channel successfully.
onConnectionLost Occurs when the local user disconnects from an RTC channel.
onRejoinChannelSuccess Occurs when the local user rejoins an RTC channel successfully.
onError Occurs when the SDK reports an error.
onUserJoined Occurs when a remote user joins an RTC channel successfully.
onUserOffline Occurs when a remote user leaves an RTC channel.
onUserMuteAudio Occurs when a remote user enables/disables sending audio.
onUserMuteVideo Occurs when a remote user enables/disables sending video.
onKeyFrameGenReq Occurs when a remote user requests a keyframe.
onAudioData Occurs when receiving the audio frame of a remote user in the channel.
onVideoData Occurs when receiving the video frame of a remote user in the channel.
onMixedAudioData Occurs when receiving the mixed audio frame of local and remote users. This callback occurs every 20 ms.
onTargetBitrateChanged Occurs when network bandwidth change is detected. Use this callback to adjust your bitrate.
onTokenPrivilegeWillExpire Occurs when the RTC token expires in 30 seconds.
onRtmData Occurs when the local user receives an RTM message.
onRtmEvent Occurs when an RTM event occurs.
onSendRtmDataResult Reports the result of the sendRtm method call.