【发布时间】:2016-11-24 06:14:11
【问题描述】:
最近我更新了我的应用程序以支持最近的version twilio chat 0.11.1。之后,当我调用 currentChannel.getMessages() 时,它返回 null。 我正在这样做
Channels channelsObject = basicClient.getIpMessagingClient
channelsObject.getChannel(channelId, new CallbackListener<Channel>() {
@Override
public void onSuccess(final Channel channel) {
currentChannel = channel;
setupRecyclerView();
}
});
private void setupRecyclerView() {
currentChannel.addListener(ChatFragment.this);
currentChannel.synchronize(new com.twilio.chat.CallbackListener<Channel>() {
@Override
public void onError(ErrorInfo errorInfo) {
Application.get().logErrorInfo("Channel sync failed", errorInfo);
}
@Override
public void onSuccess(Channel result) {
logger.d("Channel sync success for " + result.getFriendlyName());
}
});
Messages messagesObject = currentChannel.getMessages();
我收到类似
的警告 | WARNING | ChatUtils(native) | ListenerWrapper default onSuccess() not found
| WARNING | Channel(native) | No messages available, maybe you forgot to synchronize the channel?
【问题讨论】: