这是我的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) {
}
});
}