smack

What should be the JID for a user in OpenFire Server?

*爱你&永不变心* 提交于 2019-12-22 04:07:19
问题 Hi I am new to this: I have set up an Openfire Server and using Spark IM to test it. But for Android application code what should be the JID for the user in session: I have tried username@ip_address , username@ip_address/Smack , username@ip_address/Spark. Please see the image below and help: What would be the solution for this .please help. 回答1: JID is: username@xmpp-domain/Resource. The IP address of your Openfire host can be different to the XMPP Domain. You can see you XMPP Domain if you

Java and Jabber/Smack [closed]

瘦欲@ 提交于 2019-12-21 21:39:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am trying to code a simple example using the latest version of Smack (3.2.1) to send and receive messages between two accounts. Connection connection = new XMPPConnection("jabber.org"); connection.connect(); connection.login("username", "password"); But I can't even get past the login part. When I run the

How to set/get profile data with XMPP using Smack

左心房为你撑大大i 提交于 2019-12-21 17:55:58
问题 I am working on a XMPP client on Android, using the Smack library. The roster/messaging/presence stuff is running very well. However, I didn't find a way to store additional profile information (userpicture, the dogs name, ...). The only way I see from googling is using VCards. But it simply did not work. I tried the following: VCard vCard = new VCard(); vCard.load(connection); vCard.setEmailHome("meine_home@email.de"); vCard.setLastName("Scheller"); vCard.setField("blafasel", "asdf"); vCard

item-not-found(404) when trying to get a node using Smackx pubsub

北战南征 提交于 2019-12-21 05:39:18
问题 I'm trying to use the latest Smackx trunk to get and then subscribe to a pubsub node. However, openfire just sends me a back an error: item not found (404). I am instantiating the java objects from ColdFusion, so my code snippets might look funny but maybe someone will be able to tell me what I've forgotten. Here's how I create the node: ftype = createObject("java", "org.jivesoftware.smackx.pubsub.FormType"); cform = createObject("java", "org.jivesoftware.smackx.pubsub.ConfigureForm").init

aSmack error: XMPPConnection is abstract; cannot be instantiated

时光毁灭记忆、已成空白 提交于 2019-12-21 05:17:08
问题 I'm following a tutorial to make a very basic chat app with Android Studio, but I'm getting the error: Error:(131, 45) error: XMPPConnection is abstract; cannot be instantiated at the following line: ConnectionConfiguration connConfig = new ConnectionConfiguration(HOST, PORT, SERVICE); XMPPConnection connection = new XMPPConnection(connConfig); And I'm also getting some "Unhandled exception" when trying to use XMPPConnection elements. Also link to the tutorial: LINK 回答1: Looks like this

How to get DiscussionHistory for MultiUserChat room using aSmack?

回眸只為那壹抹淺笑 提交于 2019-12-21 02:03:26
问题 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. 回答1: DiscussionHistory history = new DiscussionHistory(); history.setSince(date); muc.join(nickname, null, history,

How to get DiscussionHistory for MultiUserChat room using aSmack?

拜拜、爱过 提交于 2019-12-21 02:03:23
问题 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. 回答1: DiscussionHistory history = new DiscussionHistory(); history.setSince(date); muc.join(nickname, null, history,

How to authenticate to Google Talk with AccountManager's authentication token using Smack API?

蓝咒 提交于 2019-12-20 21:44:52
问题 This question is similar to: Authenticate to Google Talk (XMPP, Smack) using an authToken I have android.accounts.AccountManager class and its methods to get authentication token for Google account: public AccountManagerFuture<Bundle> getAuthToken (Account account, String authTokenType, Bundle options, Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) I know how to prepare authentication XML: jidAndToken ="\0" + UTF8(YOURUSERNAME@gmail.com) + "\0" + Auth (where "\0"

How to authenticate to Google Talk with AccountManager's authentication token using Smack API?

﹥>﹥吖頭↗ 提交于 2019-12-20 21:44:05
问题 This question is similar to: Authenticate to Google Talk (XMPP, Smack) using an authToken I have android.accounts.AccountManager class and its methods to get authentication token for Google account: public AccountManagerFuture<Bundle> getAuthToken (Account account, String authTokenType, Bundle options, Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) I know how to prepare authentication XML: jidAndToken ="\0" + UTF8(YOURUSERNAME@gmail.com) + "\0" + Auth (where "\0"

How to get timestamp of incoming xmpp message?

梦想的初衷 提交于 2019-12-20 09:56:11
问题 I am using aSmack library to communicate with remote xmpp server. I am able to send/receive messages, but I want to get timestamp of incoming message. Could you tell me please, is it possible at all? Because I can't find anything about this question. Thanks in advance 回答1: Timestamp is not part of the regular messages. Therefore you cannot extract it. There is a spec (as mentioned by @Dmitry), but this only applies to specific types of messages. Typically those that are NOT realtime, such as