asmack

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 Create Service In Android Which Makes Persist Xmpp Connection With XMPP Server?

流过昼夜 提交于 2019-12-20 14:22:09
问题 After searching a lot on Internet we have came to one conclusion in order to ensure an persist connection with XMPP server we have to create a service, We have created one which uses Smack library to connect with XMPP server and it is working fine with mobile and wi-fi network. Every time you make something design approach always matter!!!, Smack have this reconnection mechanism already implicitly implemented in there library which listen to connection and if connection drops Smack try to

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

Create message while sending Image through Asmack

空扰寡人 提交于 2019-12-20 04:23:07
问题 There is an issue that I am facing while sending Images through XMPP.Below is the code snippet that i have done. I don't know what is wrong with the code . Message msg = new Message(emailId, Message.Type.chat); ImageTransferExtension transfer = new ImageTransferExtension(); transfer.setImageName(mImageUri.getEncodedPath()); transfer.setUserRecipient(emailId); msg.addExtension(transfer); And here is the ImagesTransferExtension code snippet EDIT : public class ImageTransferExtension implements

Asmack not loading VCard

僤鯓⒐⒋嵵緔 提交于 2019-12-20 03:56:12
问题 I am using a binary release of Asmack (I will be building it as soon as I have some time as I had problems the first time I tried). I also set up my own ejabberd server. When I try to load some contact VCard the server returns the info but Asmack does not seem to like it (or fail to parse it). This is what I can see in debug mode: <iq from='user@domain' to='admin@domain/Smack' id='I17sI-4' type='result'> <vCard xmlns='vcard-temp' prodid='-//HandGen//NONSGML vGen v1.0//EN' version='2.0'> <FN

Android XMPP connection is not persistant - asmack library even running in a separate thread

…衆ロ難τιáo~ 提交于 2019-12-19 11:52:15
问题 I am developing an Android chat app which uses asmack library. What I observe is that the XMPP connection beocmes disconnected after a particular interval of time. ( This also varies from device to device ) I am runnning the connection code in a separate thread as instructed in the below link Can't establish a new connection with aSmack 4.0.2 But I get the following exception D/Reconnection Manager(23105): scheduleReconnect: calling tryToConnect I/System.out(23105): default ping interval is

How to retrieve one to one chat history from Openfire using asmack android

本秂侑毒 提交于 2019-12-18 16:51:55
问题 Please can anyone show me the exact code for retrieving a chat history from openfire server to android client application using asmack library and XMPP protocol? In my openfire server I was enable merged Monitoring service/Open archive service and all messages successfully stored into database. But I don't know how those messages (chat history) retrieve to my client application which is building in ANDROID. What type of chat I need is one-to-one user chat (not group chat). I am success ed to

read incoming Message packets in pubsub using smack

。_饼干妹妹 提交于 2019-12-13 11:52:29
问题 i am trying to implement pubsub using openfire server and asmack library. i have configured my node in such a way that subscribers has to take the approval of publishers now i am trying to read the Message packet using following code but i am not getting any packet. i want to read Message packet because i want to know whenever the subscribers send the request to publishers to get subscribe. PacketTypeFilter filter = new PacketTypeFilter(org.jivesoftware.smack.packet.Message.class);