smack

Smack's FileTransferManager.createOutgoingFileTransfer only accepts full JIDs. How can I determine the full JID of a user in Smack?

旧街凉风 提交于 2019-12-10 10:13:07
问题 After hours of debugging and trying to find out why the file transfer was not working using aSmack, while normal messaging was, I finally managed to pin it down to this. The Openfire server is sending the Rosters' JID missing the / at the end when I follow the method given in the Smack documentation to get a user's Roster list. Collection<RosterEntry> entries = roster.getEntries(); for (RosterEntry r : entries) { Log.v("Gabriel","Receiving: " + r.getUser()); } For example if I receive a

java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream>

丶灬走出姿态 提交于 2019-12-10 05:51:55
问题 I am working on a chat app using xmpp,As per our requirement we have three server Apache Tomcat 7,ejabbered 2.1.11 and mysql 5.5, to run xmppbot on tomcat used below library -Smack-core-4.0.3.jar -smack-tcp-4.0.3.jar -xlightweb2.5.jar -xpp3-1.1.3.3.jar -xSocket-2.4.6.jar Using above library I am able to Connect with ejabberd and able to login with my login id and password but after some time of logging in connection gets close automatically and a am getting below stack trace Sep 16, 2014 4:36

Who actually uses a full JID?

心不动则不痛 提交于 2019-12-10 04:32:26
问题 When logging in to an XMPP server via smack, I only send the userid/password combination. Do server components actually use the "resource" parameter in a full JID? e.g. ali@someplace/resource What are the benefits of sending it? 回答1: Resources are useful if you have multiple clients logged in. For example, if I'm logged in at home and at work using a different resource for each connection, then I can have my presence set for each. Maybe I'm at home so work is set xa and home is set to chat .

Smack: “Trust anchor for certification path not found”

試著忘記壹切 提交于 2019-12-10 00:03:12
问题 I'm trying to connect from Android to a Apache Vysper XMPP server in localhost. I'm using Smack framework to perform XMPP operations: AbstractXMPPConnection connection = new XMPPTCPConnection("bigdestroyer", "", ip); try { connection.setPacketReplyTimeout(10000); connection.connect(); } catch (SmackException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (XMPPException e) { e.printStackTrace(); } But I get this error: javax.net.ssl.SSLHandshakeException: java

Delivering upstream messages via XMPP on Firebase Cloud Messaging misconceptions

泄露秘密 提交于 2019-12-09 18:35:42
问题 I am trying to set up FCM functionalities into my app. At the moment, I would like to display a button such that when the user presses the button an upstream message is generated which is sent to Google's CCS. It is my understanding that this upstream message will be turned into an XMPP stanza by the Google CCS. Then, it will be delivered to the phone that has the id I set to when creating the upstream message. After reading the documentation on FCM from google, I see that it is very simple

How to search registered users by name in XMPP server with Smack?

泪湿孤枕 提交于 2019-12-09 17:06:49
问题 I'm working on developing chat application in Android with asmack library. I'm using EJABBERD XMPP server. I have done some functionality including login, registration and roster entries etc., Now i want to search Registered users from XMPP server to send Buddy request. I googled and tried some codes but still not get succeed. I'm using the following code, to Search the user from XMPP server. UserSearchManager userSearchManager = new UserSearchManager(connection); Form searchForm =

Android Smack chat client

十年热恋 提交于 2019-12-09 07:08:31
问题 Hi freinds I an using Smack3.2.1.jar downloaded from following url http://www.igniterealtime.org/downloads/index.jsp I added jar to my buildpath But when I run the application I get the following Error log 10-12 13:11:59.464: ERROR/AndroidRuntime(1957): FATAL EXCEPTION: main 10-12 13:11:59.464: ERROR/AndroidRuntime(1957): java.lang.VerifyError: org.jivesoftware.smack.sasl.SASLMechanism 10-12 13:11:59.464: ERROR/AndroidRuntime(1957): at java.lang.Class.getDeclaredConstructors(Native Method) 10

Android smack server receipt ack

两盒软妹~` 提交于 2019-12-09 04:57:26
问题 I'm trying to make a chat application using XMPP. For this, I referred to this tutorial and successfully implemented it. But now I'm unable to get that particular message is received by the server and update my local DB. Please give me any idea how to do this. I'm saving a message with chatId. So from which method of smack do I get this receipt message id? 回答1: You need to save your messages by message id, you can get the id by message.getStanzaId(). You have to enable stream management.

Getting “$XMPPErrorException: XMPPError: forbidden - auth” error while creating MultiUserChat

点点圈 提交于 2019-12-09 03:22:59
问题 I've created a login connection succesfully for XMPP with Smack Api(4.1.4). Now i'm trying to create MultiUserChat using, try { String myMUCName = "TestGroup"; String myMUCService = "conference.(my local ip)"; String myMUCfullName = myMUCName + "@" + myMUCService; String userName = "Test5"; MultiUserChatManager manager = MultiUserChatManager.getInstanceFor(connection); MultiUserChat muc = manager.getMultiUserChat(myMUCfullName); muc.create(userName); Log.d(LOCAL_TAG, "createGroupChat -- Group

Smack throws “java.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserFactory:”

社会主义新天地 提交于 2019-12-08 17:32:07
问题 So im using Smack to run my chat bot for league of legends, however I can't even get the bot to show up because of a missing class error that I can't seem to figure out. Code and error below, Thanks for any help, -Nick Also: yes, this code was taken from an example because when I tried it myself I still got the same error. package com.nickparks.bot; import java.util.*; import java.io.*; import org.jivesoftware.smack.*; import org.jivesoftware.smack.packet.Message; import org.jivesoftware