在android中连接到MSN messenger

时间:2010-11-10 12:57:42

标签: android xmpp smack msn-messenger

我尝试使用带有代码的Smack库连接到MSN messanger

import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;

ConnectionConfiguration configuration = new
ConnectionConfiguration("messenger.hotmail.com", 1863, "hotmail.com"); 

configuration.setSecurityMode(SecurityMode.disabled);
configuration.setCompressionEnabled(false);

XMPPConnection connection = new XMPPConnection(configuration);

try 
{
    connection.connect();
}
catch (XMPPException e) 
{
    Log.e(TAG, "MSN connect Failed !!");
}

我收到“连接失败,服务器无响应”

我也尝试过使用java msn库它也无法正常工作。

我也尝试过使用TJMSN库,但我的应用程序崩溃了验证错误:

请帮助我...通过建议连接到 msn messanger in android

的任何方法

2 个答案:

答案 0 :(得分:1)

Microsoft Messenger不使用XMPP,因此您无法使用XMPP客户端连接到它(这是您正在尝试做的事情)

答案 1 :(得分:1)

  

Microsoft Messenger不使用XMPP

看起来已经不再是这样了。请查看以下帖子Anyone can build a Messenger client—with open standards access via XMPP

该文章提供了开发文档的链接以及 Smack based Android code samples

“有兴趣详细了解我们的XMPP界面的开发人员可以查看 our code samples on GitHub 以及 the overview documentation on the Live Connect developer center 。这些应该会给你足够的信息,以便开始与Messenger网络集成到您的移动应用程序,设备和网站。“

相关问题