smack

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

a 夏天 提交于 2019-11-29 13:26:11
问题 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

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

落爺英雄遲暮 提交于 2019-11-29 12:54:45
问题 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. 回答1: You need to define a custom class that should

Getting all users from an openfire server using smack android

帅比萌擦擦* 提交于 2019-11-29 12:53:27
i have a openfire server running on my localhost and i am successfully able to send and receive messages to registered users. however i am not been able to get all users from server. i am logged in with user that doesn't have a administration access. so do i need to give any permission on server side? The code i am using for getting all users is.. if ( xmpp.getConnection()== null || !xmpp.getConnection().isConnected()) return; try { UserSearchManager usm = new UserSearchManager(xmpp.getConnection()); Form searchForm = usm.getSearchForm("search." + xmpp.getConnection().getServiceName()); Form

Why can't I connect to the openfire server?

拥有回忆 提交于 2019-11-29 12:27:40
I'm having a little bit of trouble trying to connect to Openfire (which I've installed on my computer) while using Smack. ConnectionConfiguration config = new ConnectionConfiguration("shin-pc" ,5222); config.setCompressionEnabled(true); config.setSASLAuthenticationEnabled(true); XMPPConnection connection = new XMPPConnection(config); connection.connect(); connection.login("test", "test"); When I try debugging or running, there's an error of some sort in the connect() line. XMPPError connecting to localhost:5222.: remote-server-error(502) XMPPError connecting to localhost:5222. -- caused by:

Sending and Receiving messages using Smack Api for Android

醉酒当歌 提交于 2019-11-29 09:14:05
问题 I'm trying since last four days to send and receive chat message using own XMPP and with Smack+OpenFire. According to Smack's "readme.txt' i set up the connection and got logged user in. The code of connection and login is this public static String TAG = "Test connection"; private static XMPPTCPConnection connection; private static String userName = "demo"; private static String Password = "demo"; static { // Create the configuration for this new connection XMPPTCPConnectionConfiguration

Smack 4.1 Android anonymous registration to Openfire

不羁的心 提交于 2019-11-29 08:09:34
I want connect anonymously to openfire server with Android Smack 4.1 client and register the new user (username = "wq", password="wq") with AccountManager, and then disconnect and login as non-anonymous registered user. 3.1.1 Registration with a Server Special care must be taken when an unregistered entity interacts with a server rather than a service. Normally, a server enables in-band registration so that entities can "bootstrap" their participation in the Jabber network; this bootstrapping happens when an unregistered and unauthenticated entity opens a TCP connection to a server and

XMPP client using Smack 4.1 giving NullPointerException during login

岁酱吖の 提交于 2019-11-29 02:30:18
问题 I am trying to use Smack 4.1.0-rc3 for implementing a java xmpp client which connects to a ejabberd xmpp server. I am using the following code for connecting to the server. XMPPTCPConnectionConfiguration connConfig = XMPPTCPConnectionConfiguration .builder() .setServiceName("example.com") .setHost("192.168.56.101") .setPort(5222) .setCompressionEnabled(false) .setSecurityMode(SecurityMode.disabled) .setHostnameVerifier(new HostnameVerifier() { public boolean verify(String arg0, SSLSession

how to add new buddy in roster in xmpp

时光怂恿深爱的人放手 提交于 2019-11-28 23:56:31
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 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); In XMPP, adding is adding to your roster + subscribing to the user. Updating is just adding the user to your roster. Keep in mind the minutiae. 来源: https:/

how to do voice/video chat in android using smack api's [closed]

随声附和 提交于 2019-11-28 21:40:38
We are already using jabber smack api for chating in our application. now we are planing to upgrade my app by adding voice/video chat. I think its possible by using the jingle jabber smack but i am not getting any api's or sample code in jave for jingle. can any one please help me on this. Well, the Beem Project is working on this too . Maybe you find here some hints about jingle implementation in Java and Android. But providing voice and video calls via XMPP is not so trival. smacks jingle branch is pretty old and I am not sure if the API reflects the current state of the jingle specification

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

拥有回忆 提交于 2019-11-28 20:57:51
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.org/streams" version="1.0"> 07-30 01:01:02.593: I/System.out(424): 01:01:02 AM RCV (1156489960): <?xml