使用Backendless使用android API,尝试使用Where子句将聊天历史数据检索到聊天框但不显示数据

时间:2016-05-25 15:58:47

标签: java android backendless

这是我的RetrieveChatHistory函数,用于检索数据,聊天框中没有显示任何内容!将不胜感激

private void RetrieveChatHistory()
{
    String whereClause = "recieverEmail == '".concat(email).concat( "'" );

    BackendlessDataQuery backendlessDataQuery = new BackendlessDataQuery();
    backendlessDataQuery.setWhereClause( whereClause );

    Backendless.Persistence.of(Conversation.class).find(backendlessDataQuery, new AsyncCallback<BackendlessCollection<Conversation>>() {
       @Override
       public void handleResponse(BackendlessCollection<Conversation> conversationBackendlessCollection) {
           Conversation chatfeeds;

           for (Conversation totalchat : conversationBackendlessCollection.getData()) {
               chatfeeds = new Conversation();
               chatfeeds.setMsg(totalchat.getMsg());
               chatfeeds.setMsgDate(totalchat.getMsgDate());

               convList.add(chatfeeds);
           }
           adp.notifyDataSetChanged();
       }

       @Override
       public void handleFault(BackendlessFault backendlessFault) {

       }
   });
}

0 个答案:

没有答案