xmpp

Can't get message delivery receipt in XMPP

扶醉桌前 提交于 2019-12-11 03:16:05
问题 I am new to XMPP. I'm using XMPP and Open fire server for my chat app. The application is working but now I want to get message delivery receipt. I'm using the following code for that, in setupStream : xmppMessageDeliveryRecipts = [[XMPPMessageDeliveryReceipts alloc] initWithDispatchQueue:dispatch_get_main_queue()]; xmppMessageDeliveryRecipts.autoSendMessageDeliveryReceipts = YES; xmppMessageDeliveryRecipts.autoSendMessageDeliveryRequests = YES; [xmppMessageDeliveryRecipts activate:xmppStream

XMPP - Roster Subscription Explaination

风格不统一 提交于 2019-12-11 03:08:45
问题 Consider I've 2 users Alice and Bob on my Jabber Server. To add into the rosters with subscription as both , I need to do the following steps: Alice sends a subscription request to Bob. When Bob receives the request, he approves it. Bob may also be interested in Alice's presence, so he subscribes to her. And Alice needs to approve Bob's request. BUT Now consider, Bob was not on the server, i.e. he is unregistered and Alice tries to add him into her roster. Following are the steps which will

Efficient XMPP user search

痞子三分冷 提交于 2019-12-11 02:46:23
问题 I want to efficiently check for all local address book contacts if they have a jabber account. The users are registered on the XMPP server with the mobile phone number. I currently send the following XEP-0055 stanza to the ejabberd server and evaluate the result. <iq type="set" id="searchByUserName" to="vjud.ecoimac1.local" from="+1222333444@ecoimac1.local"> <query xmlns="jabber:iq:search"> <x xmlns="jabber:x:data" type="submit"> <field type="hidden" var="FORM_TYPE"> <value>jabber:iq:search<

Smack 4.1.0 android Roster not displaying

↘锁芯ラ 提交于 2019-12-11 02:45:51
问题 I am trying to display all available contacts even though it is not displaying it Code: Roster roster = Roster.getInstanceFor(connection); Collection<RosterEntry> entries = roster.getEntries(); System.out.println("ENTRIEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEESS"); int roster_counter = 0; for (RosterEntry entry : entries) { roster_counter++; try { System.out.println("Here is Roster " + Integer.toString(roster_counter) + ": " + entry); }catch (Exception e){ System.out.println(

Cannot send message to openfire server

末鹿安然 提交于 2019-12-11 02:22:23
问题 I am unable to send a message to a XMPP client on an openfire server using SMACK API. I m not sure where i am going wrong. I tested the same code on gtalk and it works fine. public class SenderTest { public static void main(String args[]) { ConnectionConfiguration connConfig = new ConnectionConfiguration("localhost", 5222); connConfig.setSASLAuthenticationEnabled(false); XMPPConnection connection = new XMPPConnection(connConfig); try { connection.connect(); System.out.println("Connected to "

XMPPFramework : can I determine the online/offline status of a user at all?

不问归期 提交于 2019-12-11 01:37:01
问题 How would I determine if a user is online/offline using XMPPFramework for iPhone? I have their JID etc etc. Is there a way of requesting a presence or something? Thank you. 回答1: Have you checked out the source code of the XMPPFramework sample project? If I remember correctly, this should be the relevant code snippet: // Subscribe to the buddy's presence // // <presence to="bareJID" type="subscribe"/> NSXMLElement *presence = [NSXMLElement elementWithName:@"presence"]; [presence

best way to exchange custom XML elements in XMPP?

女生的网名这么多〃 提交于 2019-12-11 01:31:00
问题 I have an XMPP application where two clients interact (1) a bot programmed with Smack (Scala/Java) and (2) a GUI chat client programmed in strophe (Javascript). The app needs to exchange custom XML (e.g., as shown below) <myPacket> <response type='sensorData'> <temperature units='Kelvin'> 234 </temperature> </response> </myPacket> What is the best way to exchange data? The following are what I could come up with: 1) Write custom XMPP stanzas 2) Embed my XML in currently defined stanzas (e.g,

starttls on node.js > 0.4.0

对着背影说爱祢 提交于 2019-12-11 01:18:31
问题 I came across this thread Node.js HTTPS Secure Error which mentions that the tls module is the way to do TLS on node now. It seems that setSecure() has been dropped. I'm trying to do a STARTTLS for XMPP. This means that the socket will be upgraded midway. How do I go about doing this on node.js > 0.4.0? 回答1: Try this: https://gist.github.com/848444 回答2: Take a close look at the lib/tls.js file in the Node Github repo. https://github.com/joyent/node/blob/master/lib/tls.js#L949-992 Another

ejabberd connection using Smack in android giving connection timed out error

。_饼干妹妹 提交于 2019-12-11 01:07:33
问题 Hello we have downloaded the ejabberd from this. domain is localhost and we have set the xmppDomain as my computer's ip address. I have used the following code for connection public static final String XMPP_DOMAIN = "localhost"; public static final String XMPP_HOST = "10.0.2.2";//kept for emaulator //public static final String XMPP_HOST = "192.168.1.152"; //ip of my pc public static final int XMPP_PORT = 5222; public static final String XMPP_RESOURCE = "xmppdemo"; public static final boolean