smack

GCM XMPP Server using Smack 4.1.0

眉间皱痕 提交于 2019-11-27 18:24:40
I'm trying to adapt the example provided here for Smack 4.1.0. and getting a little confused. Specifically I'm struggling to understand what the GcmPacketExtension should now extend, how the constructor should work and how the Providermanager.addExtensionProvider should be updated to tie in with it. I'm sure someone must have done this before but I can't find any examples and I seem to be going round in circles using just the documentation. Any help would be much appreciated, I'm sure the answer is very simple! Current Code (is compiling but not running): static { ProviderManager

Android asmack使用介绍

断了今生、忘了曾经 提交于 2019-11-27 18:23:55
XMPP 协议简介 XMPP协议(Extensible Messaging and PresenceProtocol,可扩展消息处理现场协议)是一种基于XML的协议,目的是为了解决及时通信标准而提出来的,最早是在Jabber上实现的。它继承了在XML环境中灵活的发展性。因此,基于XMPP的应用具有超强的可扩展性。并且XML很易穿过防火墙,所以用XMPP构建的应用不易受到防火墙的阻碍。利用XMPP作为通用的传输机制,不同组织内的不同应用都可以进行有效的通信。 这篇文章有基本的介绍, http://blog.csdn.net/xutaozero21/article/details/4873439 IM Instant Messenger,及时通信软件,就是大家使用的QQ、MSN Messenger和Gtalk等等。其中Gtalk 就是基于XMPP 协议的一个实现,其他的则不是。当前IM 几乎作为每个上网者必然使用的工具,在国外的大型企业中有一些企业级的IM应用,但是其商业价值还没完全发挥出来。设想既然XMPP 协议是一个公开的协议,那么每个企业都可以利用它来开发适合本身企业工作,提高自身生产效率的IM;甚至,你还可以在网络游戏中集成这种通信软件,不但让你可以边游戏边聊天,也可以开发出适合游戏本身的IM 应用,比如说一些游戏关键场景提醒功能,团队语音交流等等都可以基于IM来实现。

Mapping Openfire Custom plugin with aSmack Client

烈酒焚心 提交于 2019-11-27 16:29:00
I'm a newbie to XMPP so forgive me if this question sounds silly. I want to create a custom plugin and map it with my aSmack client on Android. I'm trying to apply my knowledge of Web Services but I'm not winning. So please guide my thinking toward the best approach, an example will be really helpful. Thanx in advance. There are many types of plugins, let's talk in general pourpose. Igniterealtime Plugin guide You want to define a brand new IQ Stanza to manage an UserCustomParam. Let's say: <iq from="user1@myserver" to="myserver" type="get"> <usercustomparam xmls:"com.records.iq" retrive=

ConnectionException when trying to connect to XMPP server from aSmack Android client

a 夏天 提交于 2019-11-27 16:23:22
I have been trying to connect to my (locally hosted) Openfire XMPP server from my aSmack Android client for hours now, and it's still not working. I get a org.jivesoftware.smack.SmackException$ConnectionException and that's it. Code: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SmackAndroid.init(getApplicationContext()); connect(); } private boolean connect(){ XMPPConnection connection = new XMPPTCPConnection(HOST); try{ connection.connect(); connection

how to add new buddy in roster in xmpp

喜欢而已 提交于 2019-11-27 15:19:52
问题 Hi i am using smack.jar.I am able to connect with gtalk using it.Using Roster.getentries() i can get my buddy list.But how can i add new friends to my buddyList.Is there any API smack exposes to add new users?? Thanks 回答1: I've been using this to create new contacts in a standard XMPP server (can't tell about gtalk): Roster roster = xmppConnection.getRoster(); // jid: String, user: String, groups: String[] roster.createEntry(jid, user, groups); 回答2: In XMPP, adding is adding to your roster +

Authenticate to Google Talk (XMPP, Smack) using an authToken

荒凉一梦 提交于 2019-11-27 14:14:22
The app I'm writing is connecting to a XMPP server, and if the user chooses, I want to give them the option to connect to their google chat account, without having to enter the credentials... To do this, I'd get the permission to use the google account, get the token and authenticate to google talk (XMPP server, using Smack) using the token.. The problem is.. how do I do that? I mean, how do I authenticate to the GTalk server if I know the login and the token? Any ideas, insights? :) If not, maybe anyone knows where could I find someone that knows? (Google contacts, anyone? :P ) You're looking

How retrieve Chat History using Java Smack library from openfire server?

a 夏天 提交于 2019-11-27 14:06:12
问题 After installing Open Archive plugin in the Openfire server I can see the chat conversation between two user from the openfire admin panel which is pretty easy and that is web based too. Now I want to retrive those conversation or chat history from chat client application(written in java) where I've used Smack library. I didn't found any helpfull resource for that. Any advice will be helpfull. 回答1: Smack just implemented MAM feature [XEP 0313] but yet not released, hope to get it on next

Smack “No Response From Server”. Not sure why am i getting this error

旧城冷巷雨未停 提交于 2019-11-27 13:21:20
问题 I have an openfire server setted up on my local machine. I am trying to connect this server, but getting "No response from server" error. Not sure why? I have spark client on the same machine that is getting connected to the server successfully. Can you please help me out to identify the problem? Below is the log details that might help 07-30 01:01:02.570: I/System.out(424): 01:01:02 AM SENT (1156489960): <stream:stream to="192.168.1.3" xmlns="jabber:client" xmlns:stream="http://etherx.jabber

How to keep a XMPP connection stable on Android with (a)smack?

自作多情 提交于 2019-11-27 11:56:13
I use asmack-android-7-beem library for Android. I have a background service running, such as my app stays alive. But sooner or later XMPP connection dies without any notice. The server says that the client is still online but no packets are sent or received. For example the client doesn't receive any presence packets when other clients have a new presence. I have XMPPConnection as an attibute of my main Application class. I set ConnectionConfiguration config.setReconnectionAllowed(true) before the connection was made. But reconnection doesn't happen. XMPPConnection connection.isConnected()

getSearchForm returns null when using UserSearch in XMPP with aSmack

こ雲淡風輕ζ 提交于 2019-11-27 08:47:00
I have this code, almost unmodified from examples: UserSearchManager usm = new UserSearchManager(conn); Form searchForm = usm.getSearchForm("search.myserver.com"); Form answerForm = searchForm.createAnswerForm(); answerForm.setAnswer("Username", true); answerForm.setAnswer("search", contact.getJid()); ReportedData data = usm.getSearchResults(answerForm, "search.myserver.com"); This works perfectly in a Desktop environment, using Smack library, but I can't get it to work in Android (where I have to use asmack). The problem is searchForm is null because getSearchForm returns null. This seems to