•   about 7 years ago

private channel questions

I have two questions related to private channel. Please have a look here and advise me.

Thank you,


  •   •   about 7 years ago

    The javadoc for MMXChannel.getPrivateChannel() is not clear; this method only gets the private channel created by the current user. In your use case, the private channel is created by another user; therefore, this method returns the Topic Not Found (404.) Once you have accepted the invitation to a private channel, you can get the subscribed channels through MMXChannel.getAllSubscriptions() and find your channel from the returning list. We'll enhance our product to make API easier for your use case in future release.

    For your 2nd use case, unfortunately we haven't made the invitation serializable to support your use case. We'll add this in future release. If you are adventurous, you are free to use the lower layer API to subscribe to the private channel by its name (here are the classes you may be interested in: MMXClient, MMXPubSubManager, MMXUserTopic. Of course, you need to download the MMX source codes from github.)

  •   •   about 7 years ago

    Correction on the 2nd case. You can actually serialize the MMXInvite object to a JSON string using com.google.gson.Gson.toJson(invite), and deserialize the JSON string to the MMXInvite object using com.google.gson.Gson.fromJson(json, MMXChannel.MMXInvite.class).

Comments are closed.