public class CometChatHelper
extends java.lang.Object
| Constructor and Description |
|---|
CometChatHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Conversation |
getConversationFromMessage(BaseMessage message) |
static BaseMessage |
processMessage(JSONObject messageObject)
This method helps to convert
JSONObject |
public static BaseMessage processMessage(JSONObject messageObject) throws JSONException
JSONObject of the message payload obtained from Push NotificationmessageObject - JSONObject of the message payloadBaseMessageJSONException - * Thrown to indicate a problem with the JSON API. Such problems include
NaNs or infinities.
Although this is a checked exception, it is rarely recoverable. Most callers should simply wrap this exception in an unchecked exception and rethrow:
public JSONArray toJSONObject() {
try {
JSONObject result = new JSONObject();
...
} catch (JSONException e) {
throw new RuntimeException(e);
}
}public static Conversation getConversationFromMessage(BaseMessage message)