smack

How to get all registered user from Openfire through http

自作多情 提交于 2019-12-13 07:41:26
问题 I am trying to make Simple Openfire plugin.I have an ArrayList of usersnames which are phone numbers, i want all the registered users from it.The ArrayList want to send the ArrayList to server by json throung get or post method ,But i donot know how my plugin can listen for that request and respond to that user. 回答1: For your specific requirement you should check Openfire Rest-API Plugin. The plugin already provides Users related operations over HTTP, like: Get overview over all or specific

Getting MucConfigurationNotSupportedException In android smack 4.2.0-beta1

≯℡__Kan透↙ 提交于 2019-12-13 06:31:25
问题 I am developing chat application for one to one chat and group chat. I have successfully done one to one chat. Using the below link I have created Group chat. Link to create Group chat in smack 4.2.0-beta1 I can see the group in admin panel but There is only a single user available, But I have created this group with three members. Here I have added my code. public void createGroupChat() { String DomainName = "conference."+ServiceAddress; // Create a MultiUserChat using a Connection for a

Openfire: Add contact subscription status set to 'from' instead of 'both'

廉价感情. 提交于 2019-12-13 04:16:48
问题 Hi I'm facing an issue with openfire and smack. I have a jabber bot developed using smack and openfire. When any user adds bot has his/her contact, then in the end of whole process, subscription status of ofRoster(openfire) table is set to 'from'. The desired result of this process is 'both'. here is my code of handling new adding connection, xmppConnection.getConnection().getRoster().setSubscriptionMode(Roster.SubscriptionMode.manual); xmppConnection.getConnection().addPacketListener( new

XMPP XEP 0333 Implementation in SMACK

痞子三分冷 提交于 2019-12-13 02:38:53
问题 I am developing a XMPP based chat application. My requirement is that I need to show the read/delivered status like in whatsapp. With some research I came to a understanding that I need to use XEP-0333 chat markers to achieve this functionality. In XMPP ios framework we have support for XEP-0333. For android I am using Smack library . I don't see any implementation of XEP-0333 in Smack library.Smack has implemented obsolete XEP-0022, not this one. Could somebody help me on this. How to

Smack API giving error while logging into Tigase Server setup locally

孤街浪徒 提交于 2019-12-13 02:33:10
问题 I am currently developing android XMPP client to communicate with the Tigase server setup locally.Before starting development on Android I am writing a simple java code on PC to test connectivity with XMPP server.My XMPP domain is my pc name "mwbn43-1" and administrator username and passwords are admin and tigase respectively. Following is the snippet of the code I am using class Test { public static void main(String args[])throws Exception { System.setProperty("smack.debugEnabled", "true");

How to retrieve Chat history with android smack client

北战南征 提交于 2019-12-13 02:05:56
问题 I'm developing a chatting application where we have deployed the eJabberd on server and using smack library client for android. Now the problem is i was not able to get the previous chat history to show. Please help me out in getting the chat history. 回答1: Chat history (latest x messages) are retrieved as defined in XEP-0045 Multi-User Chat. Message Archive are retrieved as defined in XEP-0313 Message Archive Management. Use one of those specifications. 来源: https://stackoverflow.com/questions

offline chat messages giving service-unavailable error when receiver comes online

我的未来我决定 提交于 2019-12-12 18:13:40
问题 I am getting following error message when recipient is offline and become online. I expect receiver to receive the offline message but it seems something is wrong. 2015-11-07 19:25:16.583 [debug] <0.748.0>@ejabberd_c2s:send_text:1892 Send XML on stream = <<"<message from='+999999@abc.example.com' to='+888888@abc.example.com/+888888' type='error' xml:lang='en' id='uGWtv-18'> <body>gwtnwf </body><thread>608802ea-265e-4ec4-a39a-408fd75dc268</thread> <x xmlns='jabber:x:oob'><file1url

Unable to display received messages with SMACK api in JAVA

和自甴很熟 提交于 2019-12-12 17:15:23
问题 I have made a simple client using SMACK api and OpenFire on localhost. As of now, I have two users say X and Y. Whenever anyone logs in to the client, there is a send button which sends a message to user Y. I've checked the XMPP debug manager and I'm able to send/receive messages there. However, I'm unable to display those messages in a JLabel that I have alloted for displaying the messages. If the User Y hits the send button, as per the functionality it sends a message to himself and that

service unavailable response from server while sending custom IQ

大憨熊 提交于 2019-12-12 16:11:58
问题 I am trying to send custom information with IQ in asmack from android. So I am using below code to send the custom IQ message. public void onClick(View arg0) { CustomIQ req = new CustomIQ(); req.myData="Hello world"; req.setType(IQ.Type.GET); req.setTo(Activity_title+Constants.DOMAIN); MainActivity.connection.sendPacket(req); Log.d(Constants.TAG, "xml value :"+req.toXML()); Log.d(Constants.TAG, "child element value :"+req.getChildElementXML()); Log.d(Constants.TAG, " custom IQ req sent");

Search for users on Ejabberd2 using smack, fails

这一生的挚爱 提交于 2019-12-12 11:49:43
问题 Server: ejabberd2 XMPP: smack 3.3.1 The goal is to design a chat engine. The user, by entering a username should be able to find out if the entered username is registered on the server. The Smack Javadocs can be found here I am using UserSearch classes found in the Smack library. I can connect to the server. I can login using a username and password. I can add/sign up new users into the server. I want to find if a username already exists on the server. The code that I have used and its