在 Android 中连接到 MSN 即时通讯程序

发布于 2024-10-01 04:51:44 字数 841 浏览 0 评论 0原文

我尝试使用 Smack 库和以下代码连接到 MSN Messenger,

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 Messenger in android 的任何方法

I tried connecting to MSN messanger using Smack library with follwiing code

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 !!");
}

I am getting " connection failed, no response from the server"

I also tried using java msn library it is also not working.

I also tried using TJMSN library , but my application is crashing with Verify error :

Please help me in this...by suggestiing any method to connect to msn messanger in android

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我纯我任性 2024-10-08 04:51:44

Microsoft Messenger 不使用 XMPP,因此您无法使用 XMPP 客户端连接到它(这正是您想要做的)

Microsoft Messenger doesn't use XMPP, so you can't connect to it using an XMPP client (which is what you're trying to do)

毁梦 2024-10-08 04:51:44

Microsoft Messenger 不使用 XMPP

看起来情况已不再如此。看看下面的帖子任何人都可以构建 Messenger 客户端 - 通过 XMPP 进行开放标准访问"

本文提供了开发文档和基于 Smack 的 Android 代码示例以及:

“有兴趣了解有关我们的 XMPP 界面的更多信息的开发人员可以查看我们在 GitHub 上的代码示例以及Live Connect 开发人员中心的概述文档。这些应该为您提供足够的信息来开始使用将 Messenger 网络集成到您的移动应用、设备和网站中。”

Microsoft Messenger doesn't use XMPP

Looks like it's no longer the case. Take a look at the following post "Anyone can build a Messenger client—with open standards access via XMPP".

The article provides links to development documentation and Smack based Android code samples as well:

"Developers interested in learning more about our XMPP interface can check out our code samples on GitHub along with the overview documentation on the Live Connect developer center. These should give you enough information to get started building integration with the Messenger network into your mobile apps, devices and web sites."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文