smack

MultiUserChat Send and Receive Message error

大兔子大兔子 提交于 2019-12-11 17:00:40
问题 I am develop android chat app (xmpp server -prosody- and android smack library) I created group room successfully and invite members but when I try to send message to the group this stanza error appears : <message to='rokayah89@eonaws.com/Roo' from='room31@conference.eonaws.com' id='123' type='error'><error type='cancel'><not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></message> my code for send Message: MultiUserChat muc = manager.getMultiUserChat(roomBarJid); Message

Cant able to upload file through spark(2.7.7) client to open fire

ε祈祈猫儿з 提交于 2019-12-11 15:15:10
问题 We are trying to build a chat application between two users. So, we prefer to use openfire . I have installed openfire(4.2.3) in Ubuntu server and created two test users through admin panel.I can able to chat between two users using spark client(2.7.7)or (2.8.3) but the problem is that i cant able to send a file to the another user using spark client and also even we tried to share through android code also .It is not working . I can able to browse the file using the spark client but it is

one to one chat history with open fire and smack

穿精又带淫゛_ 提交于 2019-12-11 14:06:42
问题 I have installed open fire in my system and by using postman tool i am able to create the user and by using smack i can able to send the message to other user also.. but the problem is that i dont know that how to fetch the chat history between two users..it means if i sent the from and to user names i need to fetch the previous chat history. I am able to see the chat history in the open fire servers--> archieving folder.. But i am not getting that how to fetch the chat history. Is there any

asmack send message to a rouster group

∥☆過路亽.° 提交于 2019-12-11 06:57:19
问题 I want to send a message to a roster Group (like friends group) by using asmack.(i dont want to create a room using multi user chat) Asmach has this : Message msg=new Message(java.lang.String to, Message.Type type) when want to a single user i use : Message("a@b.com",Message.Type.chat) but in group chat I think I have to use Message(java.lang.String to, Message.Type.groupchat) but I don't know what java.lang.String to should be? 回答1: XMPP does not specifiy a mechanism to send a message to a

Smack Openfire Android Unable to send message to Group/Room Error 403 forbidden

此生再无相见时 提交于 2019-12-11 06:20:53
问题 MultiUserChatManager manager = MultiUserChatManager.getInstanceFor(xmppconnection.getConnection()); try { MultiUserChat muc = manager.getMultiUserChat("test2@conference.cca"); muc.join("test2@conference.cca"); Message msg = new Message("test2@conference.cca", Message.Type.groupchat); msg.setBody("Hi Testing..Group chat.."); muc.sendMessage(msg); // muc.join("test", "1234"); } catch (SmackException.NotConnectedException e) { e.printStackTrace(); } catch (SmackException e) { e.printStackTrace()

How to uses Smack API UserSearchManager with local server?

人盡茶涼 提交于 2019-12-11 05:58:17
问题 This may look a very basic question but I am having a problem accessing OpenFire search function using this code: try { UserSearchManager search = new UserSearchManager(connection.getConnection()); Form searchForm = search.getSearchForm("search." + server); ... } catch (Exception e) {...} The server here is a String with value something like "192.168.242.132", the code gets error from this line: Form searchForm = search.getSearchForm("search." + server); Essentially, the server is up and

Problem adding buddy with smack api and openfire server

依然范特西╮ 提交于 2019-12-11 05:19:27
问题 Hi I am new in Java. And its giving me a lot of stress. I need to chat with smack api and openfire server. For this my java code is below import java.util.*; import java.io.*; import org.jivesoftware.smack.Chat; import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.MessageListener; import org.jivesoftware.smack.Roster; import org.jivesoftware.smack.RosterEntry; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org

Add element without namespace in smack message

為{幸葍}努か 提交于 2019-12-11 04:24:02
问题 I wants to add node element in smack Message . Eg. <myID> is the custom tag which i wants to add in message. like below structure <message to='username@domain' id='12345'><body>Hello</body><myID>33e6cf03-90aa-4281-a36e-902ccdf0657f</myID></message> What i tried so far By creating CustomExtension by implementing DefaultExtensionElement but here its creating message with some namespace specified. <message to='username@domain' id='12345'><body>Hello</body><myID xmlns='somenamespace'>33e6cf03

Sending a custom IQ query (Android)(Smack)

穿精又带淫゛_ 提交于 2019-12-11 04:13:54
问题 Format of result will be this. <iq from='52@localhost' to='20@localhost/Gajim' id='253' type='result'> <query xmlns='someName'> <item subscription='both' jid='1@localhost'/> </query> </iq> I am trying to send a custom iq query with the following format. <iq xmlns="Name" type="get" id="253"> <query xmlns="someName"> <auth type='token'>asd</auth> </query> </iq> From this I understand that I need to send a query with a authorization type token(token id ). Here is my try at that. final IQ iq =

How to set my Name in smack?

微笑、不失礼 提交于 2019-12-11 03:56:59
问题 I can use connection.getRoster(),getName to get roster names of contact. But how to set the name of current authenticated account? 回答1: Log in with a different account? :) Seriously, your account name is tied to your authentication, and there's no way to force the other side to use a particular nickname for you, but if both sides implement XEP-172, you can send a hint to the other side when you subscribe: <presence from='narrator@moby-dick.lit' to='starbuck@moby-dick.lit' type='subscribe'>