0

这是我用于检索数据的 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) {

       }
   });
}
4

0 回答 0