Search in sources :

Example 1 with ConversationFeed

use of com.applozic.mobicomkit.feed.ConversationFeed in project Applozic-Android-SDK by AppLozic.

the class ConversationClientService method getConversation.

// Cleanup: default
public Conversation getConversation(Integer conversationId) {
    String response = "";
    try {
        if (conversationId != null) {
            response = httpRequestUtils.getResponse(getConversationUrl() + "?id=" + String.valueOf(conversationId), "application/json", "application/json");
            ConversationFeed apiResponse = (ConversationFeed) GsonUtils.getObjectFromJson(response, ConversationFeed.class);
            Utils.printLog(context, TAG, "Conversation response  is :" + response);
            if (apiResponse != null && apiResponse.isSuccess()) {
                return (Conversation) apiResponse.getResponse();
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return null;
}
Also used : ConversationFeed(com.applozic.mobicomkit.feed.ConversationFeed) Conversation(com.applozic.mobicommons.people.channel.Conversation)

Aggregations

ConversationFeed (com.applozic.mobicomkit.feed.ConversationFeed)1 Conversation (com.applozic.mobicommons.people.channel.Conversation)1