smack

How to use smack with Openfire

此生再无相见时 提交于 2019-12-03 14:49:00
Hi I am planning to develop a chat client which can connect to gtalk facebook etc...I have decided to use the smack API along with openfire.. But I need little guidance as to how to use it with openfire server.. And does the openfire provide a basic UI like log in box chat window etc... I need to know how to plug or use smack with openfire Thanks:) Tim Büthe I have decided to use the smack API along with openfire.. But I need little guidance as to how to use it with openfire server.. What about Smack API Getting Started ? And does the openfire provide a basic UI like log in box chat window etc

Android/Smack: Keep XMPP connection alive in sleep mode

怎甘沉沦 提交于 2019-12-03 14:41:52
I have an Android application that has a chat client as one of its features. The chat client uses XMPP based on the Smack library for Android and running Openfire as XMPP server in the background. The connection is established using BOSH The whole XMPP connection handling is implemented as a service to run and listen in the background for incoming messages even if not activity of the app is in the foreground. So far, everything works perfectly fine. The only problem seems to be the sleep mode. In the emulator (when set to "Stay Awake") or with the phone in use, the XMPP connections is holding

Issue in blocking user in chatlist using smack and open fire server

牧云@^-^@ 提交于 2019-12-03 14:30:19
I want to block a particular friend from my chat list with XMPP . code works fine. There is no Exception, but I am not able to block a user. I'm using open fire server. what changes should i made on server? Can u guys have any idea? My code: public void XMPPAddNewPrivacyList(Connection connection, String userName) { String listName = "newList"; // Create the list of PrivacyItem that will allow or // deny some privacy aspect List<PrivacyItem> privacyItems = new Vector<PrivacyItem>(); PrivacyItem item = new PrivacyItem(PrivacyItem.Type.jid.toString(), false, 1); item.setValue(userName);

difference between XMPP servername and XMPP servicename?

故事扮演 提交于 2019-12-03 12:56:16
In Smack API, there is a configuration class for connection, described at this page ConnectionConfiguration I am confused about the distinction between service name and server name. Suppose I have a computer named "mybox.mydomain.com", and I have ejabberd on it with a configured host called "myhost" (using the line {hosts, ["myhost"]}. in ejabbed.cfg), what is the host name, server name and service name in this case? myhost: service name (or XMPP domain) mybox.mydomain.com: hostname and servername. You can host an XMPP domain over any host, provided that you set the SRV records right in the

smack 4.1 Openfire Sample example

谁说胖子不能爱 提交于 2019-12-03 10:14:36
问题 I have been using smack 3.4 for my web portal. Also used asmack 3.4 for my android app (aSmack development stopped some years back but there where some unofficial jars that i used. Faced issues with file upload and group chat with this it so want to upgrade to official smack as it has andoid native support now). But now there is a update on smack they have moved to 4.1(android native integrated): https://github.com/igniterealtime/Smack/wiki/Smack-4.1-Readme-and-Upgrade-Guide. So i am looking

What is the difference between Smack and aSmack?

爱⌒轻易说出口 提交于 2019-12-03 10:03:53
问题 I am not able to use Smack on Android whereas aSmack works perfectly? When compared the source code it looks somewhat similar, where does the difference comes from? What is the difference between Smack and aSmack? 回答1: Smack < 4.1 does not work on Android, mostly because of APIs missing on Android (e.g. most of the javax APIs). That is the reason the aSmack build environment was born. It is a way to modify Smack so that it can be used on Android. Besides many minor changes the biggest changes

How can I make use of XMPP XEP-0184 “Message Delivery Receipts” with Smack?

纵饮孤独 提交于 2019-12-03 09:53:43
问题 Hi is there any way to do android xmpp client which will be able to get message receive confirmation (XEP-0184) I read that there is XEP-0184 in smack but normal smack is not working with android(or I can't do it) there is always SASL authentication exception. 回答1: Smack received support for XEP-0184 with SMACK-331. You can't use Smack < 4.1 directly under Android, you need Smack 4.1 (or higher). You can read more about Smack's XEP-0184 API in the javadoc of DeliveryReceiptManager. 回答2: Yes

(a)Smack returns “service-unavailable (503)” error at login()

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to implement a simple jabber messenger on Android using asmack library. Here's the code: public boolean login() { if (connection != null && connection.isConnected()) { Log.i("XMPP", connection.getHost()); try { connection.login(USERNAME, PASSWORD); } catch (XMPPException e) { e.printStackTrace(); return false; } return true; } return false; } Exception I get after connection.login() (connection looks fine): service-unavailable(503) at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication.java:77) at org

get online users(Roster entries) using smack 4.1 in android

折月煮酒 提交于 2019-12-03 08:14:31
I have been trying to get roster entries using smack 4.1 beta 2 in android. https://github.com/igniterealtime/Smack/wiki/Smack-4.1-Readme-and-UpgradeGuide Quotes from above link.. "Roster now follows the Manager pattern (use Roster.instanceFor to obtain an instance, no more XMPPConnection.getRoster)" First of all i am not able get the "Roster" object, libraries that i have imported may not have that package or i miss any lib here? I m using all the libraries mentioned in above link. Can anyone help me to get the Roster Entries using smack 4.1? Thanks Siege This is a step-by-step solution that

How to get DiscussionHistory for MultiUserChat room using aSmack?

戏子无情 提交于 2019-12-03 08:04:55
How to get the DiscussionHistory of a MUC room from MultiUserChat ? I am able to create MultiUserChat instance and room by using aSmack library, now I want to show all the previous conversations that happened in the room. Anybody experienced in the same please help me. I Google searched a lot about this but still I did't get any proper documentation / explanation on this. DiscussionHistory history = new DiscussionHistory(); history.setSince(date); muc.join(nickname, null, history, SmackConfiguration.getReplyTimeout()); // Get historical message; Message oldMsg = muc.nextMessage(timeout); You