Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have worked much on chatting application using XMPP/Openfire server.</p> <p>Here is simplest way to connect/login to the server -</p> <pre><code>ConnectionConfiguration connConfig = new ConnectionConfiguration("abc.hostname.com",5222); configure(ProviderManager.getInstance()); connection = new XMPPConnection(connConfig); connection.connect(); connection.login(userName, password); </code></pre> <p>To get the roster at the time of login</p> <pre><code> roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.manual); </code></pre> <p>Here is the configure method for the provider instance</p> <pre><code>public void configure(ProviderManager pm) { // MUC Admin pm.addIQProvider("query", "http://jabber.org/protocol/muc#admin",new MUCAdminProvider()); // MUC Owner pm.addIQProvider("query", "http://jabber.org/protocol/muc#owner",new MUCOwnerProvider()); pm.addIQProvider("si", "http://jabber.org/protocol/si",new StreamInitiationProvider()); pm.addIQProvider("query","http://jabber.org/protocol/bytestreams", new org.jivesoftware.smackx.provider.BytestreamsProvider()); pm.addIQProvider("query","http://jabber.org/protocol/disco#items", new DiscoverItemsProvider()); pm.addIQProvider("query","http://jabber.org/protocol/disco#info", new DiscoverInfoProvider()); // Delayed Delivery pm.addExtensionProvider("x", "jabber:x:delay",new DelayInformationProvider()); pm.addIQProvider("vCard", "vcard-temp", new VCardProvider()); // Group Chat Invitations pm.addExtensionProvider("x","jabber:x:conference", new GroupChatInvitation.Provider()); } </code></pre> <p>Let me know if you have any queries</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload