smack

'remote-server-timeout' exception as I try to connect to the server

柔情痞子 提交于 2019-12-20 06:26:15
问题 While trying to connect to openfire server through the following code : Connection connection = new XMPPConnection("https://192.168.0.101:5222"); connection.connect(); I get an exception which says : https://192.168.0.101:5222:5222 Exception: Could not connect to https://192.168.0.101:5222:5222.; : remote-server-timeout(504) What could be the reason for this ? Note : I have allowed openfire fire server through the firewall.I also tried putting off the firewall, but the same result.Server is

get delivery status of recent messages in smack

十年热恋 提交于 2019-12-20 03:02:35
问题 I'm newby in smack 4.2.4 and xmpp. I've sent bunch of messages but the recipent is not available to get them,I've close the application and next time when I'll open the application want to check the status of messages, which is delivered or not. 回答1: You can use XEP-0184: Message Delivery Receipts for check delivery of messages to destination. First you must add the gradle dependency of smack-extensions: implementation 'org.igniterealtime.smack:smack-extensions:4.2.2; Then use this code, when

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

Getting error while fetching archived messages(XEP-0313 MAM - chat history) from openfire-4.1.1

谁说胖子不能爱 提交于 2019-12-19 11:06:08
问题 Openfire version - 4.1.1(Which has XEP-0313 MAM support) Smack version - 4.2.0-rc2-SNAPSHOT(Which has XEP-0313 MAM support) Monitoring Service version - 1.5.4 After installing Monitoring Service plugin in Openfire, I've also eabled Message Archiving. To fetch archived messages, MamManager mamManager = MamManager.getInstanceFor(mConnection); MamQueryResult mamQueryResult = mamManager.queryArchive(5); Sent Stanza : <?xml version="1.0" encoding="UTF-8"?> <iq id="33F2H-15" type="set"> <query

Adding Custom Attributes in Message tag in XMPP packet using asmack for android?

南楼画角 提交于 2019-12-19 04:05:45
问题 The Message Packet that i want to recieve. <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> Message Packet that I am Recieving. <message to="44@domainname.com/Smack" from="room73407

How to register a new user on XMPP using (a)Smack library

萝らか妹 提交于 2019-12-18 11:27:39
问题 I have set up a xmpp server and android client using the great post here... I have some pre defined users set up in the xmpp server and i could login with those credentials. Now, from my app i want to register as new users to the xmpp server through the android client. Can anyone please suggest me how to attain this... Any help will be grately appreciated...!!! 回答1: Smack has InBand registration functionality that can be used via the AccountManager class. Note that not every server has this

Keep XMPP connection (using asmack) alive on Android

怎甘沉沦 提交于 2019-12-18 10:45:04
问题 I'm developing an application that receives push notifications via XMPP ( I know C2DM, but it has some limitations and I can't use because of it ), the problem is the connection that after some time is garbage collected and I can't send push notification to the Android device. I think I need to implement an Android service but I have no idea how to implement a service that would keep the connection alive. Somebody could help me? 回答1: I am not sure if "garbage collected" is the right term here

Why can't I connect to the openfire server?

无人久伴 提交于 2019-12-18 07:16:38
问题 I'm having a little bit of trouble trying to connect to Openfire (which I've installed on my computer) while using Smack. ConnectionConfiguration config = new ConnectionConfiguration("shin-pc" ,5222); config.setCompressionEnabled(true); config.setSASLAuthenticationEnabled(true); XMPPConnection connection = new XMPPConnection(config); connection.connect(); connection.login("test", "test"); When I try debugging or running, there's an error of some sort in the connect() line. XMPPError

how to do voice/video chat in android using smack api's [closed]

旧街凉风 提交于 2019-12-18 01:17:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . We are already using jabber smack api for chating in our application. now we are planing to upgrade my app by adding voice/video chat. I think its possible by using the jingle jabber smack but i am not getting any api's or sample code in jave for jingle. can any one please help me

How to receive Incoming XMPP Messages using Smack?

怎甘沉沦 提交于 2019-12-17 23:23:43
问题 I read some examples and tested them but all of them need to start a chat with someone first to receive Incoming Messages... I want to retrieve this Incoming Messages without need to talk first to the jid anyone can give an example ? 回答1: You need to register a ChatListener to be notified of new chats, then you can add a message listener to them like normal: connection.getChatManager().addChatListener(new ChatManagerListenerImpl()); .... private class ChatManagerListenerImpl implements