smack

How to send room configuration form and create persistence rooms from android using smack 4.3.4

旧时模样 提交于 2020-01-11 13:14:30
问题 I am facing problem for create persistence room and MUC, Not able to send room configuration form. Values i send that are not set to form fields and default values are send to server. 回答1: multiUserChatManager = MultiUserChatManager.getInstanceFor(connection); multiUserChat = multiUserChatManager.getMultiUserChat(JidCreate.entityBareFrom(roomJID)); multiUserChat.create(Resourcepart.from(nickname)); Form form = multiUserChat.getConfigurationForm(); Form submitForm = form.createAnswerForm();

How to implement XMPP chat in an android app?

你离开我真会死。 提交于 2020-01-06 13:28:30
问题 I tried using the Smack library, but all i get is this: 05-07 04:28:43.299 2958-2958/g.d.allinonechat E/dalvikvm﹕ Could not find class 'javax.naming.directory.InitialDirContext', referenced from method org.jivesoftware.smack.util.dns.JavaxResolver.<clinit> that with a search on Google i found out, Google doesn't let some JRE classes work on Android, so.. nothing to do here tried aSmack, i'm using windows, tried compiling it on Linux Ubuntu, but it wouldn't compile ./build.bash line 142 /root

How to implement XMPP chat in an android app?

心不动则不痛 提交于 2020-01-06 13:27:12
问题 I tried using the Smack library, but all i get is this: 05-07 04:28:43.299 2958-2958/g.d.allinonechat E/dalvikvm﹕ Could not find class 'javax.naming.directory.InitialDirContext', referenced from method org.jivesoftware.smack.util.dns.JavaxResolver.<clinit> that with a search on Google i found out, Google doesn't let some JRE classes work on Android, so.. nothing to do here tried aSmack, i'm using windows, tried compiling it on Linux Ubuntu, but it wouldn't compile ./build.bash line 142 /root

Chat works only one-way with Smack 4.1.7 Android

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 03:11:47
问题 I am working on Android Chat app based on Smack 4.1.7 . I have created my XMPP related operations on Saperate class said MyXMPP.java. and in my app's Application class i am initializing MyXMPP class objects. my problem is, suppose we have user 1 and user 2. if user 1 sends message to user 2 then user 2 can get message but cant reply back. means if user 2 trying to reply then user 1 can not get user 2's reply. in short if user 1 initiates chatting then, only user 1 can send message. user 2 can

Chat works only one-way with Smack 4.1.7 Android

女生的网名这么多〃 提交于 2020-01-06 03:11:01
问题 I am working on Android Chat app based on Smack 4.1.7 . I have created my XMPP related operations on Saperate class said MyXMPP.java. and in my app's Application class i am initializing MyXMPP class objects. my problem is, suppose we have user 1 and user 2. if user 1 sends message to user 2 then user 2 can get message but cant reply back. means if user 2 trying to reply then user 1 can not get user 2's reply. in short if user 1 initiates chatting then, only user 1 can send message. user 2 can

Smack Presence Doesn't Work

大城市里の小女人 提交于 2020-01-04 17:51:51
问题 Actually I programming a IM service (inherited google chat) by using smack API. But when i want to print buddy list and their presences, the compile mode show all presences unavailable, but in the debug mode it shows the real availability! My code is ... 1- create connection public boolean openConnection() { ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration("talk.google.com", 5222, "mail.google.com"); this.connection = new XMPPConnection(connectionConfiguration);

How to use MucEnterConfiguration in android smack 4.2.0-beta1?

匆匆过客 提交于 2020-01-04 14:16:43
问题 I want to rejoin room and don’t want any history, but DiscussionHistory is deprecated. So I found class MucEnterConfiguration . But I am unable to create object of MucEnterConfiguration . MucEnterConfiguration is a final class so it can’t be extends and don’t have a public constructor. MucEnterConfiguration.Builder is also final class so it can’t be extends and don’t have a public constructor. How I can create object of it. Thanks 回答1: EntityBareJid mucJid = JidCreate.entityBareFrom(roomJid);

XMPP ( with smack) - Adding Friend

不想你离开。 提交于 2020-01-03 03:31:25
问题 In my chat application when I have to add a friend I have to follow this process - Suppose A->B ist : A will send subscribe packet to B ( server entry shows NONE subscription ) iind - B will send subscribed packet to A ( server entry will be - TO/FROM) iiird - B will again send subscribe packet to A ( server entry TO/FROM ) ivth - A will send subscribed packet to B ( server entry BOTH ) Each time a notification is sent to the concerned user and after allowing corresponding packet is sent. I

How Can I create,send and receive iq packets using smack(java)

做~自己de王妃 提交于 2020-01-02 06:30:51
问题 I am connected to server(Xmpp) but unable to send and receive packets at my psi client Here is snippet of my code POSClientIQ posclientiq = new POSClientIQ(); posclientiq.connectXMPPServer(); posclientiq.processMessage(); } public void processMessage() { try{ final IQ iq1 = new IQ() { public String getChildElementXML() { return "<iq type='get' from ='sam'><query xmlns='jabber:iq:roster'></query></iq>"; } }; iq1.setType(IQ.Type.GET); // PacketCollector collector = connection

Could not establish socket with any provided host

对着背影说爱祢 提交于 2020-01-02 05:05:09
问题 I am struggling with file transfer in android.I am using smack 4.1 to connect to openfire server. My problem is: When i am using Spark to Spark file transfer, it works fine.But when i transfer file from Spark to Android or Android to Android , The iq received showing error "Could not establish socket with any provided host" like this: <iq id="018vq-231" to="sender@domain.com/Spark 2.6.3" from="receiver@domain.com/Smack" type="error"> <error code="-1" type="CANCEL"> <item-not-found xmlns="urn