Skip to main content
Android
iOS
macOS
Web
Linux C++
Unity

Migration guide

This migration guide helps you migrate from Signaling 1.x to Signaling 2.x.

In December 2023, Agora released Signaling 2.x in response to market and industry needs. Signaling 2.x brings significant innovation to users in terms of:

  • Features coverage: Signaling 2.x expands its scope to encompass a broader range of business scenarios through the introduction of functional modules including Channel, Message, Topic, Presence, Storage, and Lock. These additions empower you to shift your attention from fundamental feature implementation to fostering business innovation.

  • Performance improvement: Signaling 2.x revamps the backend architecture, enhancing overall performance through optimized network connections. This overhaul results in sustained low-latency, higher reliability, increased concurrency, and seamless scalability for real-time network access. With these advancements, businesses can confidently rely on the backend, to ensure both optimal performance and high-quality service.

  • Experience optimization: All documents, including user guides and API references, have been optimized and furnished more comprehensive sample code. These enhancements empower developers with a cost-effective learning experience, enable swift integration and improve development efficiency when utilizing the SDK.

For a seamless transition from Signaling 1.x to 2.x, refer to the following document. This resource is designed to expedite the migration process, ensuring that you can swiftly leverage the new features in Signaling 2.x and start reaping their benefits.

Activate Signaling

To activate Signaling 2.x, take the following steps:

  1. Log in to Agora Console
  2. Create a new Agora project or choose an existing project from the project list.
  3. Select the project on the Project Management page and click the pencil icon to configure it.
  4. Go to All features > Signaling > Basic information and select a data center in the dropdown.
  5. Go to Subscriptions > Signaling and subscribe to a plan.
  6. Copy the App ID for your project for use in your code.
info

Signaling version 2.x differs from 1.x in the support of naming character sets. For example, 2.x does not support channel names, user names, or topic names that start with _ or contain . characters. When upgrading from 1.x to 2.x or using both versions together, be aware of possible incompatibilities caused by character set differences. Best practice is to use the character set supported by 2.x when migrating. See Channel naming for the character set supported by 2.x.

Integrate the SDK

You can integrate the Signaling 2.x SDK into your app either using a CDN or through Maven Central. The integration methods are as follows:

  • For 1.x:


    _4
    dependencies {
    _4
    // Replace x.y.z with the specific SDK version, e.g., 1.5.1
    _4
    implementation 'io.agora.rtm:rtm-sdk:x.y.z'
    _4
    }

  • For 2.x:


    _4
    dependencies {
    _4
    // Replace x.y.z with the specific SDK version, e.g., 2.1.9
    _4
    implementation 'io.agora:agora-rtm:x.y.z'
    _4
    }

    Info

    Note that the SDK package names for 2.x and 1.x are different. The 2.x package name is agora-rtm, while the 1.x package name is rtm-sdk.

Initialize an RTM Client instance

Signaling 2.x makes adjustments to initialization parameters. It introduces new features such as end-to-end encryption, and cloud proxy. Refer to the API Reference for details. Additionally, 2.x provides richer error information when invoking interfaces, allowing you to quickly identify issues. Look up Error Codes for efficient troubleshooting.

  • Sample code for 1.x:


    _25
    try {
    _25
    rtmClient = RtmClient.createInstance(getBaseContext(), "your_appId", new RtmClientListener() {
    _25
    @Override
    _25
    public void onConnectionStateChanged(int state, int reason) {
    _25
    }
    _25
    _25
    @Override
    _25
    public void onMessageReceived(RtmMessage rtmMessage, String peerId) {
    _25
    }
    _25
    _25
    @Override
    _25
    public void onTokenExpired() {
    _25
    }
    _25
    _25
    @Override
    _25
    public void onTokenPrivilegeWillExpire() {
    _25
    }
    _25
    _25
    @Override
    _25
    public void onPeersOnlineStatusChanged(Map<String, Integer> status) {
    _25
    }
    _25
    });
    _25
    } catch (Exception e) {
    _25
    throw new RuntimeException("RTM initialization failed!");
    _25
    }

  • Sample code for 2.x:


    _8
    RtmConfig rtmConfig = new RtmConfig.Builder("your_appId", "your_userId")
    _8
    .eventListener(eventListener)
    _8
    .build();
    _8
    try {
    _8
    rtmClient = RtmClient.create(rtmConfig);
    _8
    } catch (Exception e) {
    _8
    e.printStackTrace();
    _8
    }

Log in to Signaling

The login method for 2.x differs from 1.x:

  • Sample code for 1.x:


    _10
    rtmClient.login("your_token", "your_userId", new ResultCallback<Void>() {
    _10
    @Override
    _10
    public void onSuccess(Void responseInfo) {
    _10
    // Handle login result
    _10
    }
    _10
    @Override
    _10
    public void onFailure(ErrorInfo errorInfo) {
    _10
    // Handle errors
    _10
    }
    _10
    });

  • Sample code for 2.x:


    _11
    rtmClient.login("your_token", new ResultCallback<Void>() {
    _11
    @Override
    _11
    public void onSuccess(Void responseInfo) {
    _11
    // Handle login success
    _11
    }
    _11
    _11
    @Override
    _11
    public void onFailure(ErrorInfo errorInfo) {
    _11
    // Handle errors
    _11
    }
    _11
    });

Event notifications

Signaling 2.x has redesigned the system event notification mechanism and API interfaces. It provides more detailed classification and aggregation of event notification types, and optimizes the payload data structure.

2.x introduces the following types of event notifications:

Event TypeDescription
onMessageEventMessage event notification: Receives notifications for all message events in subscribed Message channels and topics.
onPresenceEventUser presence and custom state change event notification (Presence event notification): Receives notifications for Presence events in subscribed Message Channels and joined Stream Channels, including user online/offline status, and custom temporary state changes.
onTopicEventTopic change event notification: Receives notifications for Topic changes in joined Stream Channels.
onStorageEventChannel and user metadata event notification: Receives notifications for channel Metadata events in subscribed Message channels and joined Stream channels, as well as user metadata events for subscribed users.
onLockEventLock change event notification: Receives notifications for Lock events in subscribed Message channels and joined Stream channels.
onConnectionStateChanged(Deprecated) Network connection state change event notification: Receives notifications for changes in client network connection state.
onLinkStateEventReceives notifications of changes in the client's network connection state, including information such as the connection state before and after the change, service type, operation type that caused the change, reason for the change, and channel list.
onTokenPrivilegeWillExpireReceives notifications when the client's token is about to expire.

For more information on event notifications and payload data structures, see Event listeners.

Consider the example of listening to channel message events:

  • For 1.x:


    _7
    rtmChannel = rtmClient.createChannel("channelName", new RtmChannelListener() {
    _7
    @Override
    _7
    public void onMessageReceived(final RtmMessage message, final RtmChannelMember fromMember) {
    _7
    // Handle message event
    _7
    }
    _7
    // Add other event notifications
    _7
    });

  • For 2.x:


    _20
    RtmEventListener eventListener = new RtmEventListener() {
    _20
    @Override
    _20
    public void onMessageEvent(MessageEvent event) {
    _20
    // Handle message event
    _20
    }
    _20
    // Add other event notifications
    _20
    };
    _20
    _20
    // Option 1: Add event listener when initializing RTM Client instance with create method
    _20
    RtmConfig rtmConfig = new RtmConfig.Builder("your_appId", "your_userId")
    _20
    .eventListener(eventListener)
    _20
    .build();
    _20
    try {
    _20
    rtmClient = RtmClient.create(rtmConfig);
    _20
    } catch (Exception e) {
    _20
    e.printStackTrace();
    _20
    }
    _20
    _20
    // Option 2: Add event listener at any time during the app's lifecycle
    _20
    rtmClient.addEventListener(eventListener);

The comparison demonstrates significant differences:

  • In 1.x, channel message event notifications are bound to specific channel instances. Users need to call the createChannel() method to create a channel instance, then register the onMessageReceived callback to handle events. The SDK notifies the handler through this callback when a message is received. If multiple channels are involved, this process needs to be repeated for each channel. In 2.x, message event notifications are bound to the client instance globally. You call the addEventListener() method to register the callback code once, and it applies to all subscribed channels or topics. This simplifies the implementation for handling message events across multiple channels or topics.

  • The payload data structure for message event notifications in 2.x contains more information, which simplifies implementation of custom business logic.

Channel messages

In version 1.x, to send a channel message, you needed to:

  • Create a Channel instance
  • Join the channel
  • Send and receive channel messages

The disadvantage to this design is that you cannot independently send messages. You must also receive messages because sending and receiving is coupled. Signaling 2.x adopts a new Pub/Sub-based model designed to decouple sending and receiving messages. When sending messages, you only need to publish to the specified channel without joining the channel. To receive channel messages, you only need to subscribe to the specified channel. The two operations are independent.

  • Sample code for 1.x:


    _36
    // Create channel
    _36
    rtmChannel = rtmClient.createChannel("channelName", new RtmChannelListener() {
    _36
    @Override
    _36
    public void onMessageReceived(final RtmMessage message, final RtmChannelMember fromMember) {
    _36
    // Handle message event
    _36
    }
    _36
    // Add other event notifications
    _36
    });
    _36
    _36
    // Join channel
    _36
    rtmChannel.join(new ResultCallback<Void>() {
    _36
    @Override
    _36
    public void onSuccess(Void responseInfo) {
    _36
    // Handle join channel result
    _36
    }
    _36
    _36
    @Override
    _36
    public void onFailure(ErrorInfo errorInfo) {
    _36
    // Handle errors
    _36
    }
    _36
    });
    _36
    _36
    // Send message
    _36
    RtmMessage message = rtmClient.createMessage();
    _36
    message.setText("Hello World!");
    _36
    rtmChannel.sendMessage(message, new ResultCallback<Void>() {
    _36
    @Override
    _36
    public void onSuccess(Void aVoid) {
    _36
    // Handle message send result
    _36
    }
    _36
    _36
    @Override
    _36
    public void onFailure(ErrorInfo errorInfo) {
    _36
    // Handle errors
    _36
    }
    _36
    });

  • Sample code for 2.x:


    _39
    // Send message in Message Channel
    _39
    String message = "Hello world";
    _39
    PublishOptions options = new PublishOptions();
    _39
    options.customType = 'PlainText';
    _39
    rtmClient.publish("channelName", message, options, new ResultCallback<Void>() {
    _39
    @Override
    _39
    public void onSuccess(Void responseInfo) {
    _39
    // Handle message send result
    _39
    }
    _39
    @Override
    _39
    public void onFailure(ErrorInfo errorInfo) {
    _39
    // Handle errors
    _39
    }
    _39
    });
    _39
    _39
    // Subscribe to Message Channel
    _39
    SubscribeOptions options = new SubscribeOptions();
    _39
    options.setWithMessage(true);
    _39
    rtmClient.subscribe("channelName", options, new ResultCallback<Void>() {
    _39
    @Override
    _39
    public void onSuccess(Void responseInfo) {
    _39
    // Handle subscribe result
    _39
    }
    _39
    @Override
    _39
    public void onFailure(ErrorInfo errorInfo) {
    _39
    // Handle errors
    _39
    }
    _39
    });
    _39
    _39
    // Handle received messages
    _39
    rtmClient.addEventListener(new RtmEventListener() {
    _39
    @Override
    _39
    public void onMessageEvent(MessageEvent event) {
    _39
    String channelName = event.getChannelId();
    _39
    String content = event.getMessage();
    _39
    // Handle received message
    _39
    }
    _39
    // Add other event notifications
    _39
    });

Peer-to-peer messaging

In version 1.x, peer-to-peer messaging API is used to send messages to specified users. For example, if you want to send a message to the user whose UserId is "Tony", you can do it as follows:


_21
// v1
_21
// Create an instance of RtmMessage
_21
RtmMessage message = rtmClient.createMessage();
_21
// Set the text of the message to "Hello World!"
_21
message.setText("Hello World!");
_21
_21
// Create options for sending the message
_21
SendMessageOptions options = new SendMessageOptions();
_21
_21
// Send the message to the peer named "Tony" using the RtmClient
_21
rtmClient.sendMessageToPeer("Tony", message, options, new ResultCallback<Void>() {
_21
@Override
_21
public void onSuccess(Void aVoid) {
_21
// Handle the success of message sending
_21
}
_21
_21
@Override
_21
public void onFailure(ErrorInfo errorInfo) {
_21
// Handle the failure and provide error information
_21
}
_21
});

The design of this interface in version 1.x is tailored to fulfill the requirements of an end-to-end message transmission scenario. In this context, User A seeks to send a message exclusively to User B, and User B only desires to receive this specific message without subscribing to other events. The channel mechanism in version 1.x is structured based on the Room model. However, this design lacks the capability to decouple message sending and receiving.

In version 2.x, Agora redesigned the distribution of channel messages using the Pub/Sub model to decouple sending and receiving of messages. You can still implement point-to-point messages using channels. Use the following scheme to implement peer-to-peer messaging with Signaling 2.x.

  • Each user subscribes to a private channel named inbox_ + UserID after initialization, which you call Inbox. Only the user with the specific UserID can subscribe to this channel.

  • To send a peer-to-peer message to a user, just send the message to the user's Inbox.

  • Sample code for 2.x:


    _32
    // 2.x
    _32
    // 1. Subscribe to your own inbox
    _32
    String channelName = "inbox_Tony";
    _32
    SubscribeOptions options = new SubscribeOptions();
    _32
    options.setWithMessage(true);
    _32
    rtmClient.subscribe(channelName, options, new ResultCallback<Void>() {
    _32
    @Override
    _32
    public void onSuccess(Void responseInfo) {
    _32
    // Handle subscription result
    _32
    }
    _32
    _32
    @Override
    _32
    public void onFailure(ErrorInfo errorInfo) {
    _32
    // Handle errors
    _32
    }
    _32
    });
    _32
    _32
    // 2. Send a message to Lily
    _32
    String channelName = "inbox_Lily";
    _32
    String message = "This is a message";
    _32
    PublishOptions options = new PublishOptions();
    _32
    rtmClient.publish(channelName, message, options, new ResultCallback<Void>() {
    _32
    @Override
    _32
    public void onSuccess(Void responseInfo) {
    _32
    // Handle message send result
    _32
    }
    _32
    _32
    @Override
    _32
    public void onFailure(ErrorInfo errorInfo) {
    _32
    // Handle errors
    _32
    }
    _32
    });

    Note
    To receive messages, you need to implement the message event listening function.

Picture and file messages

For reasons of user data privacy, compliance and cost optimization, Signaling 2.x no longer directly supports image and file message types. After version 1.5.0, the related interfaces have been removed. However, this does not mean that you cannot use Signaling to transmit and distribute image and file messages. You can build image and file message functions with the help of Signaling 2.x and third-party object storage services, such as Amazon S3 or Alibaba Cloud OSS. Not only can you get the best factual message transmission experience, you can also implement more flexible technical solutions. For example, CDN static resource acceleration or image and text moderation. The following code sample shows you how to use Signaling 2.x and Amazon S3 object storage service to build and send image and file messages.


_27
// 1. Upload the file to Amazon S3
_27
_27
// 2. Notify RTM
_27
JSONObject jsonObject = new JSONObject();
_27
// File type, the receiving party can parse the message packet structure based on this field
_27
jsonObject.put("type", "file");
_27
// Your bucket name on Amazon S3, the receiving party needs this field to download the file
_27
jsonObject.put("bucket", "uploadParams.Bucket");
_27
// The Key under which the file is stored on Amazon S3, the receiving party needs this field to download the file
_27
jsonObject.put("key", "uploadParams.Key");
_27
// File content type
_27
jsonObject.put("contentType", "uploadParams.ContentType");
_27
// File URL address
_27
jsonObject.put("url", "data.Location");
_27
_27
PublishOptions options = new PublishOptions();
_27
rtmClient.publish("receiver", jsonObject.toString(), options, new ResultCallback<Void>() {
_27
@Override
_27
public void onSuccess(Void responseInfo) {
_27
// Handle message send result
_27
}
_27
_27
@Override
_27
public void onFailure(ErrorInfo errorInfo) {
_27
// Handle errors
_27
}
_27
});

Information

When using Amazon S3 for static file storage, go to the Amazon S3 console and set the correct user permissions and access policies. Refer to Access Control Best Practices for more information.

User presence and custom status

In Signaling 1.x, you can subscribe to or query the online status of multiple users, query the number of users in a channel, or obtain the list of online members in a channel. Signaling 2.x not only retains these features, but also implements upgrades and extends them. In Signaling 2.x, these capabilities are redefined and implemented in the Presence module. Presence provides the ability to monitor user online, user offline and user status change notifications. Through the Presence module, you can obtain the following information in real time:

  • A user joins or leaves the specified channel
  • Customize temporary user status and its changes
  • Query which channels a specified user has joined or is subscribed to
  • Query which users have joined the specified channel and their temporary status data

Call the getOnlineUsers method to query the number of online users in the specified channel, the list of online users, and the temporary status of online users in real-time.


_17
// 2.x
_17
PresenceOptions options = new PresenceOptions();
_17
options.setIncludeUserId(true);
_17
options.setIncludeState(true);
_17
options.setPage("yourBookMark");
_17
_17
rtmClient.getPresence().getOnlineUsers("channelName", RtmChannelType.MESSAGE, options, new ResultCallback<GetOnlineUsersResult>() {
_17
@Override
_17
public void onSuccess(GetOnlineUsersResult result) {
_17
// Handle the getOnlineUsers call result
_17
}
_17
_17
@Override
_17
public void onFailure(ErrorInfo errorInfo) {
_17
// Handle errors
_17
}
_17
});

Call the getUserChannels method to get a list of channels where the specified user is present, in real-time.


_12
// 2.x
_12
rtmClient.getPresence().getUserChannels("Tony", new ResultCallback<ArrayList<ChannelInfo>>() {
_12
@Override
_12
public void onSuccess(ArrayList<ChannelInfo> channels) {
_12
// Handle the getUserChannels call result
_12
}
_12
_12
@Override
_12
public void onFailure(ErrorInfo errorInfo) {
_12
// Handle errors
_12
}
_12
});

To meet the user status requirements of business scenarios, Signaling 2.x provides temporary user status capabilities. Customize temporary user status through the setState method. Users can add their scores, game status, location, mood, and other customized statuses.


_17
// 2.x
_17
ArrayList<StateItem> stateItems = new ArrayList<>();
_17
stateItems.add(new StateItem("mood", "pumped"));
_17
_17
rtmClient.getPresence().setState("channelName", RtmChannelType.MESSAGE, stateItems, new ResultCallback<Void>() {
_17
@Override
_17
public void onSuccess(Void responseInfo) {
_17
// Handle the setState call result
_17
}
_17
_17
@Override
_17
can someone please explain this to me
_17
_17
public void onFailure(ErrorInfo errorInfo) {
_17
// Handle errors
_17
}
_17
});

You can retrieve a user's online state at any time by using the getState method, or remove your own state by using the removeState method. Signaling triggers a presence event notification of type REMOTE_STATE_CHANGED when a user's temporary state is changed. See the Presence guide for details on how to use this feature.

Signaling 2.x makes it very simple to listen to the real-time notification of users entry, exit, timeout and temporary status changes in a channel. To do this, implement the following steps:

  • Implement a Presence event listener
  • Enable the withPresence switch when you join the channel

You can add a Presence event listener as follows:


_24
// 2.x
_24
// 1. Implement the Presence event listener
_24
RtmEventListener eventListener = new RtmEventListener() {
_24
@Override
_24
public void onPresenceEvent(PresenceEvent event) {
_24
// Handle Precense event notifications
_24
}
_24
};
_24
rtmClient.addEventListener(eventListener);
_24
_24
// 2. When subscribing to a channel, turn on the withPresence switch
_24
SubscribeOptions options = new SubscribeOptions();
_24
options.setWithPresence(true);
_24
rtmClient.subscribe("channelName", options, new ResultCallback<Void>() {
_24
@Override
_24
public void onSuccess(Void responseInfo) {
_24
// Handle message subscription result
_24
}
_24
_24
@Override
_24
public void onFailure(ErrorInfo errorInfo) {
_24
// Handle errors
_24
}
_24
});

In Signaling 2.x real-time notifications have been redesigned. The presence event notification mode refers to how subscribed users of presence events in the channel are notified. There are two available modes:

  1. Real-time notification mode (Announce)
  2. Scheduled notification mode (Interval)

You can determine the conditions for switching between the two modes through the Announce Max parameter in the project settings of the Agora Console. The interval notification mode can prevent noisy events caused by too many online users in the channel. For details, see Event Listeners.

User metadata and channel metadata

Signaling 2.x retains the full functionality of user metadata and channel metadata, with new capabilities such as versioning and locking. It adds optimized interfaces to make these features easier to use.

In 2.x, user attributes and channel attributes are mounted under the Storage module. To set channel attributes, refer to the following code:


_25
// 2.x
_25
// Create a Metadata instance
_25
Metadata metadata = rtmClient.getStorage().createMetadata();
_25
// Set Major Revision
_25
metadata.setMajorRevision(174298270);
_25
// Add a Metadata Item
_25
metadata.setMetadataItem(new MetadataItem("Apple", "100", 174298200));
_25
// Add another Metadata Item
_25
metadata.setMetadataItem(new MetadataItem("Banana", "200", 174298100));
_25
// Record the timestamp and user ID when setting Metadata Items
_25
MetadataOptions options = new MetadataOptions();
_25
options.setRecordTs(true);
_25
options.setRecordUserId(true);
_25
_25
rtmClient.getStorage().setChannelMetadata("channelName", RtmChannelType.MESSAGE, metadata, options, "lockName", new ResultCallback<Void>() {
_25
@Override
_25
public void onSuccess(Void responseInfo) {
_25
// Handle setChannelMetadata result
_25
}
_25
_25
@Override
_25
public void onFailure(ErrorInfo errorInfo) {
_25
// Handle errors
_25
}
_25
});

To learn more about how to get, update, and delete channel attributes, how to use version control and lock control, refer to the Storage guide. The use of user attributes is similar to that of channel attributes.

Events for channel attributes and user attributes are distributed to users through onStorageEvent type event notifications. To listen to these events:

  1. Implement the Storage event listener.
  2. When subscribing to a channel, turn on the withMetadata switch.

_26
// 2.x
_26
// 1. Implement the Storage event listener
_26
RtmEventListener eventListener = new RtmEventListener() {
_26
@Override
_26
public void onStorageEvent(StorageEvent event) {
_26
// Handle Storage event notifications
_26
}
_26
_26
// Add other event notifications
_26
};
_26
rtmClient.addEventListener(eventListener);
_26
_26
// 2. When subscribing to a channel, turn on the withMetadata switch
_26
SubscribeOptions options = new SubscribeOptions();
_26
options.setWithMetadata(true);
_26
rtmClient.subscribe("channelName", options, new ResultCallback<Void>() {
_26
@Override
_26
public void onSuccess(Void responseInfo) {
_26
// Handle message subscription result
_26
}
_26
_26
@Override
_26
public void onFailure(ErrorInfo errorInfo) {
_26
// Handle errors
_26
}
_26
});

Restrict access area

Signaling supports the restricted access area feature to comply with the laws and regulations of different countries or regions. After turning on the restricted access area feature, no matter which area the user uses your app from, the SDK will only access the Agora server in the geographical specified area. Signaling 1.x implements access area limitation as follows.

  • Sample code for 1.x:


    _4
    // 1.x
    _4
    RtmServiceContext context = new RtmServiceContext();
    _4
    context.areaCode = RtmAreaCode.AREA_CODE_GLOB;
    _4
    setRtmServiceContext(context);

  • Sample code for 2.x:


    _5
    // 2.x
    _5
    RtmConfig rtmConfig = new RtmConfig.Builder(appId, userId)
    _5
    .areaCode(EnumSet.of(RtmAreaCode.AS))
    _5
    .eventListener(eventListener)
    _5
    .build();

Other new features

In addition to the enhancements presented in this document, Signaling 2.x introduces an array of additional features. Choose and implement features that fit the needs of your project. The following table outlines key new features of Signaling 2.x:

ModuleFunctionSignaling 2.x API Interface
SetupCreate InstanceRtmClient create(RtmConfig config)
Destroy InstanceRtmClient.release()
Token Configurationlogin interface with token parameter
End-to-End EncryptionRtmEncryptionConfig with encryptionMode, encryptionKey, encryptionSalt parameters
Presence Timeout SettingRtmConfig with presenceTimeout parameter
Log Level SettingRtmLogConfig with level parameter
Proxy ConfigurationRtmProxyConfig with proxyType, server, port, account, password parameters
Event Listenervoid addEventListener(RtmEventListener listener)
void removeEventListener(RtmEventListener listener)
Login Servicevoid login(String token, ResultCallback<Void> resultCallback)
Logout Servicevoid logout(ResultCallback<Void> resultCallback)
ChannelUnsubscribe Channelvoid unsubscribe(String... channelIds)
Subscribe Channelvoid subscribe(String channelName, SubscribeOptions options, ResultCallback<Void> resultCallback)
Unsubscribe Channelvoid unsubscribe(String channelName, ResultCallback<Void> resultCallback)
Create Stream ChannelStreamChannel createStreamChannel(String channelName)
Join Stream Channelvoid join(JoinChannelOptions options, ResultCallback<Void> resultCallback)
Leave Stream Channelvoid leave(ResultCallback<Void> resultCallback)
Destroy Stream ChannelstreamChannel.release()
TopicJoin Topicvoid joinTopic(String topicName, JoinTopicOptions options, ResultCallback<Void> resultCallback)
Publish Topic Messagevoid publishTopicMessage(String topicName, String message, TopicMessageOptions options, ResultCallback<Void> resultCallback)
Leave Topicvoid leaveTopic(String topicName, ResultCallback<Void> resultCallback)
Subscribe Topicvoid subscribeTopic(String topicName, TopicOptions options, ResultCallback<SubscribeTopicResult> resultCallback)
Unsubscribe Topicvoid unsubscribeTopic(String topicName, TopicOptions options, ResultCallback<Void> resultCallback)
MessageSend Messagevoid publish(String channelName, String message, PublishOptions options, ResultCallback<Void> resultCallback)
PresenceQuery Channel's Online Usersvoid getOnlineUsers(String channelName, RtmChannelType channelType, ResultCallback<GetOnlineUsersResponse> resultCallback)
Query User's Channelvoid getUserChannels(String userId, ResultCallback<GetUserChannelsResponse> resultCallback)
Set User's Temporary Statevoid setState(String channelName, RtmChannelType channelType, ArrayList<StateItem> items, ResultCallback<Void> resultCallback)
Query User Temporary Statevoid getState(String channelName, RtmChannelType channelType, String userId, ResultCallback<UserState> resultCallback)
Remove User Temporary Statevoid removeState(String channelName, RtmChannelType channelType, ArrayList<String> keys, ResultCallback<Void> resultCallback)
StorageSet Channel Metadatavoid setChannelMetadata(String channelName, RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback)
Get Channel Metadatavoid getChannelMetadata(String channelName, RtmChannelType channelType, ResultCallback<Metadata> resultCallback)
Remove Channel Metadatavoid removeChannelMetadata(String channelName, RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback)
Update Channel Metadatavoid updateChannelMetadata(String channelName, RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback)
Set User Attributesvoid setUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback)
Get User Attributesvoid getUserMetadata(String userId, ResultCallback<Metadata> resultCallback)
Remove User Attributesvoid removeUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback)
Update User Attributesvoid updateUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback)
Subscribe User Attributesvoid subscribeUserMetadata(String userId, ResultCallback<Void> resultCallback)
Unsubscribe User Attributesvoid unsubscribeUserMetadata(String userId, ResultCallback<Void> resultCallback)
LockSet Lockvoid setLock(String channelName, RtmChannelType channelType, String lockName, long ttl, ResultCallback<Void> resultCallback)
Acquire Lockvoid acquireLock(String channelName, RtmChannelType channelType, String lockName, boolean retry, ResultCallback<Void> resultCallback)
Release Lockvoid releaseLock(String channelName, RtmChannelType channelType, String lockName, ResultCallback<Void> resultCallback)
Revoke Lockvoid revokeLock(String channelName, RtmChannelType channelType, String lockName, String owner, ResultCallback<Void> resultCallback)
Query Lockvoid getLocks(String channelName, RtmChannelType channelType, ResultCallback<ArrayList<LockDetail>> resultCallback)
Remove Lockvoid removeLock(String channelName, RtmChannelType channelType, String lockName, ResultCallback<Void> resultCallback)

Signaling