0
我正在使用Xmpp協議創建聊天應用程序,用戶可以與其他用戶聊天,但用戶無法接收離線消息。但如果用戶有多個離線消息,收到消息。Xmpp和Android
什麼解決方案?
ConnectionConfiguration config = new ConnectionConfiguration(Constants.CHAT_SERVER,Constants.CHAT_SERVER_PORT,Constants.CHAT_SERVER_DOMAIN);
config.setSASLAuthenticationEnabled(false);
connection = new XMPPConnection(config);
try
{
connection.connect();
Log.i("XMPPClient", "[SettingsDialog] Connected to " + connection.getHost());
}
catch (XMPPException ex)
{
Log.i("XMPPClient", "[SettingsDialog] Failed to connect to " + connection.getHost());
}
connection.login(userName, password);