Release notes
The Agora Signaling SDK provides a streamlined and stable messaging mechanism for you to quickly implement real-time messaging for various scenarios. See product overview for more information.
This page contains information on the following releases:
v2.2.1
v2.2.1 was released on August 9, 2024.
Compatibility changes
This release optimizes the implementation of the following features, which involves renaming, deleting, or modifying the behavior of some APIs. To ensure the proper functioning of your project, modify your implementation after upgrading the SDK.
-
Removes the
createMetadata
method. Refer to the sample code below to modify your implementation: -
Removes the
StateItem
class, and changes the type of the following parameters fromArrayList<StateItem>
toHashMap<String, String>
:- The
items
parameter of thesetState
method. - The
stateItems
parameter of thePresenceEvent
class. - The
states
parameter of theUserState
class.
- The
-
Adds
CERTIFICATION_VERIFY_FAILURE(22)
inRtmConnectionChangeReason
. The values ofSTREAM_CHANNEL_NOT_AVAILABLE
andINCONSISTENT_APPID
change to 23 and 24, respectively.
New features
-
Private deployment capability
This release adds the
privateConfig
parameter inRtmConfig
to set private deployment. See Private deployment configuration. -
Heartbeat interval configuration
This release adds the
heartbeatInterval
parameter inRtmConfig
to set the interval at which the SDK sends heartbeat packets to the server. See Heartbeat interval and presence timeout parameters. -
Dual environment configuration
This release adds the
protocolType
parameter inRtmConfig
to set the network transport protocol. See Connection protocol. -
User channel
This release adds the
USER
type inRtmChannelType
for sending messages to specific users. This feature can replace the peer-to-peer messaging feature in v1. -
Quiet mode configuration
This release adds the
beQuiet
property inSubscribeOptions
andJoinChannelOptions
to enable quiet mode when subscribing or joining a channel. Once you enable the quiet mode, other users in the channel cannot receive your presence event notifications.
Improvements
-
Connection state management
This release deprecates the
onConnectionStateChanged
callback and adds theonLinkStateEvent
callback instead. See Connection management for details. -
REMOTE_STATE_CHANGED
event notification logicThis release changes the triggering logic of the
REMOTE_STATE_CHANGED
event. When a user sets or modifies multiple key-value pairs at once, other users in the channel receive only one event notification. -
Support for event notification timestamps
This release adds a new
timestamp
parameter in the following data structures to report the timestamp of the triggered event notification: -
Optimized API behavior
This release improves the behavior of the following APIs:
login
- Before v2.2.1: The SDK does not support multiple consecutive calls to this method, or passing an empty string in the
token
parameter. - v2.2.1 or later: The SDK supports multiple consecutive calls to this method without the need for additional calls to
logout
in between. Additionally, when thetoken
parameter is an empty string, the SDK uses the app ID you provided during initialization as a replacement for the token.
- Before v2.2.1: The SDK does not support multiple consecutive calls to this method, or passing an empty string in the
subscribe
- Before v2.2.1: The SDK does not support multiple consecutive calls to this method.
- v2.2.1 or later: The SDK supports multiple consecutive calls to this method.
join
- Before v2.2.1: The SDK does not support multiple consecutive calls to this method, or passing an empty string in the
token
parameter. - v2.2.1 or later: The SDK supports multiple consecutive calls to this method. Additionally, when the
token
parameter is an empty string, the SDK uses the app ID you provided during initialization as a replacement for the token.
- Before v2.2.1: The SDK does not support multiple consecutive calls to this method, or passing an empty string in the
-
Range of
presenceTimeout
This release changes the range of the
presenceTimeout
parameter in theRtmConfig
from [10, 300] to [5, 300]. -
Other improvements
This release also enhances the underlying algorithm capability to improve the data synchronization speed.
Fixed issues
This release fixed the issue that remote users occasionally did not receive the REMOTE_LEAVE
event notification when the local user directly called the logout
method without calling the leave
method.
v2.1.12
v2.1.12 was released on July 2, 2024.
Improvements
This release includes the following improvements:
- For data synchronization errors caused by network issues, this release introduces a user logout mechanism, which ensures that the SDK automatically logs out of the Signaling system.
- Unsubscribing from a message channel during network disconnection will no longer return an error.
Fixed issues
This release fixed the following issues:
- During a disconnection with the Signaling system under poor network conditions, the user experienced errors when unsubscribing from a message channel.
- Under poor network conditions, the user occasionally failed to receive callbacks after a successful login.
- After reconnecting from a disconnection, the user occasionally could not receive the
onStorageEvent
event notification. - After reconnecting from a disconnection, the SDK occasionally failed to restore subscription relationships in the stream channel.
- Occasional failure to receive topic messages from web clients.
v2.1.11
v2.1.11 was released on May 13, 2024.
Improvements
This release optimizes the response mechanism when subscribing to or joining channels with the withPresence=true
setting. If the user does not receive the SNAPSHOT
type of onPresenceEvent
event notification within 5 seconds, the SDK will report the CHANNEL_PRESENCE_NOT_READY
error code in the resultCallback
parameter.
Fixed issues
This release fixed the following issues:
- In specific scenarios, after logging out of the Signaling system and logging back in, occasional failures occurred when subscribing to or joining channels with the
withPresence=true
setting. - In cases where the connection was lost due to network issues and then restored, if the local user actively called the
leave
method to leave the channel, the remote user occasionally did not receive theREMOTE_TIMEOUT
type of theonPresenceEvent
event notification. - Occasional failures occurred when frequently calling the
subscribe
andunsubscribe
methods.
v2.1.10
v2.1.10 was released on March 11, 2024.
Fixed issues
This release fixed the following issues:
- When sending messages frequently, message sending occasionally timed out.
- After calling
renewToken
to renew the token, some services were not functioning correctly, resulting in unexpected disconnection.
v2.1.9
v2.1.9 was released on February 22, 2024.
Compatibility changes
This release improves message publishing options as follows:
- Removes the
sendTs
parameter and adds thechannelType
parameter inPublishOptions
. See details inPublishOptions
. - Modifies the type of the
options
parameter in thepublishTopicMessage
method fromPublishOptions
toTopicMessageOptions
. See details inTopicMessageOptions
.
Make sure to modify the implementation of the relevant features after upgrading the SDK.
Improvements
This release adds the following improvements:
- Adds error codes:
INVALID_CHANNEL_TYPE
,RTM_ERROR_INVALID_ENCRYPTION_PARAMETER
, andRTM_ERROR_OPERATION_RATE_EXCEED_LIMITATION
. For error code descriptions and solutions, see Error Codes. - Optimizes the handling logic for expired user status data during reconnection.
Fixed issues
This release fixed the occasional crash issue when calling the getOnlineUsers
method to retrieve paginated results.
v2.1.7
v2.1.7 was released on January 22, 2024.
New features
-
Stream Channel
Experience seamless, delay-free data flow from one point to another. Stream channel solution refers to a real-time data pipeline that enables the uninterrupted flow of data from one point to another without delay or latency.
-
Pub/Sub
Embrace asynchronous messaging, enabling instant communication between publishers and subscribers without the need for immediate responses. The pub/sub model is a messaging pattern used in real-time messaging solutions where publishers send messages to channels, and subscribers receive messages from the channels they are subscribed to.
-
Topic
Effectively manage data streams with topics, enabling seamless communications between users. Topic serves as a data flow management mechanism in the stream channel. It enables users to subscribe to, distribute, and notify events of data streams. Topics allow users to register as message publishers, send messages, and receive messages from subscribed publishers in a channel.
-
Storage
Storage is important in signaling solutions to ensure reliable message delivery and prevent message loss or drop.
-
Removing Event Listeners
This release adds the removeEventListener method. You can use it to remove a specified event listener.
-
Interval Mode
This release supports the interval mode of presence function. When the number of online users in a channel exceeds the specified Announce Max value, the channel enters the interval mode. The SDK triggers the presence event notification at regular intervals and provides aggregated incremental information about user join, leave, timeout, and state changes in the interval property. For more details, see Interval Mode.
-
Locks
Implement locks to maintain the sequence of messages, ensuring your data is processed in a specific order, preventing any data conflicts. When a client accesses a resource, it can acquire a lock on that resource to prevent other clients from accessing it.