asmack

Can't create a multi user chat (MUC) room with aSmack library for Android: “packet.DefaultPacketExtension cannot be cast to packet.MUCUser”

点点圈 提交于 2019-12-02 17:43:39
For an application I need to be able to create a multi user chatroom and join it. The chat server is a openfire server. I used to have: MultiUserChat chat = new MultiUserChat(connection, roomName + "@conference.localhost"); chat.join(nickname); When the room doesn't exist it creates the room and joins. however the next user can't join. He get's a 404, recipient unavailable(404). Which suggests the chatroom is locked or something. Then I found code in the documentation and I tried the following: chat.create(nickname); // Send an empty room configuration form which indicates that we want // an

Create message while sending Image through Asmack

随声附和 提交于 2019-12-02 07:24:11
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 PacketExtension { private String userRecipient; private String ftpUrl; private String httpUrl; private

Asmack not loading VCard

断了今生、忘了曾经 提交于 2019-12-02 04:23:21
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>Full Name</FN> <N> <FAMILY>Surname</FAMILY> <GIVEN>Nick</GIVEN> </N> <NICKNAME>Nickname</NICKNAME> <URL

Smack on Android, getting error code=“404” remote-server-not-found while sending packets/message between two users via local Openfire server

♀尐吖头ヾ 提交于 2019-12-01 18:31:38
I was glad to implement smack on android via local Openfire server where it connects to Gmail server-host and it worked like charm. The tutorial found here But I'm getting an error (pasted below) when I'm trying to connect two users via android emulators with a local Openfire server installed. 03-23 16:24:01.392: DEBUG/SMACK(233): 04:24:01 PM SENT (1155246128): <message id="t0tgA-5" to="justestingchat2" type="chat"><body>hi</body></message> 03-23 16:24:07.032: DEBUG/SMACK(233): 04:24:07 PM RCV (1155246128): <message id="t0tgA-5" to="justestingchat@admin-pc/Smack" from="justestingchat2" type=

How to know Typing Status in XMPP openfire using Smack

六眼飞鱼酱① 提交于 2019-12-01 16:55:57
I am developing chat application by using Openfire XMPP server. I can text chat between two user. But i want to know Typing status when some one is typing message. So i created a class :- public class typingStatus implements ChatStateListener { @Override public void processMessage(Chat arg0, Message arg1) { // TODO Auto-generated method stub } @Override public void stateChanged(Chat arg0, ChatState arg1) { // TODO Auto-generated method stub System.out.println(arg0.getParticipant() + " is " + arg1.name()); } } But i am confuse so that How will it work? I know that i need a packet where i can it

How to know Typing Status in XMPP openfire using Smack

时间秒杀一切 提交于 2019-12-01 14:40:00
问题 I am developing chat application by using Openfire XMPP server. I can text chat between two user. But i want to know Typing status when some one is typing message. So i created a class :- public class typingStatus implements ChatStateListener { @Override public void processMessage(Chat arg0, Message arg1) { // TODO Auto-generated method stub } @Override public void stateChanged(Chat arg0, ChatState arg1) { // TODO Auto-generated method stub System.out.println(arg0.getParticipant() + " is " +

Cannot Read Custom Attributes From Message TAG when using asmack XMPP library for android?

僤鯓⒐⒋嵵緔 提交于 2019-12-01 14:01:53
问题 This is the XML sent From XMPP Server Side that i want to recieve so that i can send it to my XML parser. <message to="39@domainname.com/smack" chat_id="73392" custom_packet="true" user_id="44" manager_id="39" time_stamp="0" website_id="0" visitor_name="John" end_time="False" xml:lang="en-us" type="groupchat" from="room73392@conference.domainname.com/39"> <body>Hello</body> <x xmlns="http://jabber.org/protocol/muc#user"> <status xmlns="" code="0"/> </x></message> This Is a sample XML that i

Asmack file transfer progress always at 0.0

我的未来我决定 提交于 2019-12-01 12:40:21
问题 Hi there i am using asmack-android-19-0.8.10.jar and openfire to develop file transfer. i refered to harryjoy.me but i have problems when sending the file where transfer.getProgress() always return 0.0. below is the log file. Send File : 05-06 15:42:35.669: D/SMACK(25533): 03:42:35 PM SENT (1103132248): <iq id="7dnrX-23" to="lala@kaoru-pc/Smack" from="lolo@kaoru-pc/Smack" type="set"> <si xmlns="http://jabber.org/protocol/si" id="jsi_8243824082816759940" mime-type="image/jpeg" profile="http:/

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

旧城冷巷雨未停 提交于 2019-12-01 12:34:52
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 :10 W/System.err(23105): org.jivesoftware.smack.SmackException$ConnectionException W/System.err(23105):

Android Smack 4.1.1 File Transfering, ERROR Could not establish socket

╄→гoц情女王★ 提交于 2019-12-01 12:11:31
I am trying to send files over my android app with smack library 4.1.1, though i am having some errors to do so. The thing is that i don't know why it just sends the files to a device but after that it doesn't let me to send to others and others can't send to others either, for example the first time i opened a listener with one device, that device could and can still send files just to one device (the first that it sent) but the one that receives can not, the file seems to arrive but with 0 data or maybe it doesn't arrive and just when arrives something causes error i am not sure but after a