将消息发送给对方客户
if (!XmppBuddies.isConnected())
{
Toast.makeText(this, "离线状态,发送失败", 0).show();
startService(new Intent("com.appkefu.lib.action.CONNECT"));
return;
}
String str1 = this.l.getText().toString();
if (!"".equals(str1))
{
str1 = KFExpressionUtil.faceToCN(str1);
KFTools.send(str1, this.ab, "chat", this);
String str2 = this.l.getText().toString();
KFConversationHelper.getConversationHelper(this).addOrUpdate(this.Z, str1, "chat");
this.aq.addMessage(this.Z, str2, 1);
KFChatEntity localKFChatEntity = new KFChatEntity();
localKFChatEntity.setDate(KFUtils.getDate());
localKFChatEntity.setSend(1);
localKFChatEntity.setText(str2);
this.o.add(localKFChatEntity);
this.n.notifyDataSetChanged();
this.l.setText("");
this.m.setSelection(this.m.getCount() - 1);
}
else
{
Toast.makeText(this, "消息内容不能为空", 0).show();
}