smack

Creating new user with Smack on ejabberd throws XMPP Exception: forbidden(403)

吃可爱长大的小学妹 提交于 2019-11-30 17:16:10
问题 Hi I am working on ejabberd and I am quite new to this technology. I am trying to add a user on my ejabberd server using this code: try { conf.setSASLAuthenticationEnabled(true); connection.connect(); Roster.setDefaultSubscriptionMode(Roster.SubscriptionMode.manual); Log.i("XMPPClient", "Connected to " +connection.getHost()); createUser("tester","testerpass"); } } catch (XMPPException e1) { Log.e("XMPPClient", e1.toString()); xmppClient.setConnection(null); } public void createUser(String

ReconnectionManager in asmack

可紊 提交于 2019-11-30 15:40:19
I have a project on Android, which needs to use asmack library to enable real time chat. The key feature is reconnecting mechanism, that means my application can reconnect automatically whenever the internet connection loses. Here is my code snippet: ConnectionConfiguration connConfig = new ConnectionConfiguration(HOST, PORT); connConfig.setSASLAuthenticationEnabled(true); connConfig.setReconnectionAllowed(true); XMPPConnection connection = new XMPPConnection(connConfig); But I got this error whenever I turned off then turned on Wifi: 10-01 21:43:26.942: W/System.err(13695): javax.net.ssl

Android ADD FRIEND using Smack

情到浓时终转凉″ 提交于 2019-11-30 15:38:57
问题 I am new to the use of smack library and making one chatting application. I have made upto much extent and at this step i want to ask two questions. when i add a friend the friend got added in my list but there is not any notification sent to the FRIEND whom i have added, How to achieve the same. I have added the code below. The second thing i want to ask is that how can I check whether the user which I am going to add is a part or member of the app or not ( mean it is on the server or not).

Android ADD FRIEND using Smack

浪子不回头ぞ 提交于 2019-11-30 15:15:47
I am new to the use of smack library and making one chatting application. I have made upto much extent and at this step i want to ask two questions. when i add a friend the friend got added in my list but there is not any notification sent to the FRIEND whom i have added, How to achieve the same. I have added the code below. The second thing i want to ask is that how can I check whether the user which I am going to add is a part or member of the app or not ( mean it is on the server or not). So that the user who is not registered to the app should not be added in the friends list. here is the

XMPP “stream:error (conflict)” on login with (a)Smack

三世轮回 提交于 2019-11-30 13:07:41
Currently i am working with xmpp/jabber chat for android.i just tried with Openfire and try to connect my jabber account.connection was successful.but i am not able to send any message.it shows some conflict error.please check the error log.give me a solution for this. Initializing connection to server eworks port 5222 Connected: true Creating entry for buddy 'testuser2' with name testuser2 Sending mesage 'Hello mate' to user testuser2@eworks Buddy:testuser2 - Status:null stream:error (conflict) at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:306) at org.jivesoftware

How to implement message read status like whatsapp blue tick mark?

ぃ、小莉子 提交于 2019-11-30 11:10:12
问题 I am developing one application in that chatting is one module, for chatting i am using xmpp. when i am sending message i am getting that message delivery status using DeliveryReceiptManager. DeliveryReceiptManager.getInstanceFor(connection).enableAutoReceipts(); DeliveryReceiptManager.getInstanceFor(connection).addReceiptReceivedListener(new ReceiptReceivedListener() { @Override public void onReceiptReceived(String arg0, String arg1, String arg2) { Log.v("app", arg0 + ", " + arg1 + ", " +

Cannot get list of public rooms from xmpp Server on Android?

若如初见. 提交于 2019-11-30 10:28:57
Hello Everyone i am new to android and i am currently stuck on this. I have to return list of public rooms created on xmpp server. The problem i am having is that the code below works fine for java but there is a null pointer exception in case of android. Any help regarding this would be appreciated. I am using an openfire server and testing it on local machine so that is the reason why i am using ip Address instead of domain name. I am using smack library for JAVA and Asmack Library for android String server_name = "192.168.3.113"; ConnectionConfiguration config = new ConnectionConfiguration(

Java - trying to prebind converse.js using bosh but not able to get the sid and rid…using the smack bosh

本秂侑毒 提交于 2019-11-30 09:38:34
问题 I am trying to connect to the open fire using the smack bosh and trying to prebind the converse.js in the web page. My bosh code BOSHConfiguration config = new BOSHConfiguration(false, "host", 7070, "/http-bind/", "<host>", "xmpp:127.0.0.1:5222"); BOSHConnection connection = new BOSHConnection(config); try { connection.connect(); connection.login("un", "pw"); String sss = connection.getConnectionID(); String bosh = connection.BOSH_URI; } catch (Exception e) { } Can some one help me how to

Error on smack 4.2.0 : IN AAAA yielded an error response NX_DOMAIN

和自甴很熟 提交于 2019-11-30 09:22:01
i start openFire and test it with spark everything is ok but when i try to connect with smack 4.2.0 in android studio i got this error: Ljavax/naming/directory/InitialDirContext; and my dependencies is this: compile "org.igniterealtime.smack:smack-java7:4.2.0" compile "org.igniterealtime.smack:smack-tcp:4.2.0" compile "org.igniterealtime.smack:smack-im:4.2.0" compile "org.igniterealtime.smack:smack-extensions:4.2.0" compile "org.igniterealtime.smack:smack-android-extensions:4.2.0" compile "org.igniterealtime.smack:smack-bosh:4.2.0" when remove this : "compile org.igniterealtime.smack:smack

How to send custom XML packet using Java's Smack API?

强颜欢笑 提交于 2019-11-30 09:02:24
I'm using the Smack API in Java to connect to my XMPP server. I want to send a customized message packet like this: <message to="you@MyServer.com" type="chat" MYFIELD="custom stuff"> <body> hi </body> <CUSTOM_STANZA A="..." B="..."> C="..." D="..." </CUSTOM_STANZA> </message> I'm guessing that I create implement my own Packet with that returns this XML in it's toXML() method. But that doesn't seem to work. Any help would be appreciated. shanraisshan You need to define a custom class that should implements ExtensionElement (as menitioned by @ Flow ) A very detailed explanation that produces the