smack

Should we use GCM (or new FCM) with openfire for offline pushnotification messages?

﹥>﹥吖頭↗ 提交于 2019-12-12 11:21:21
问题 It seams like to work with chat application, using openfire and smack there can be two ways below, First Way Smack makes a connection with the openfire server and it can receive and send updates to the server as long as its connected to the openfire server. In case its not connected, theres a plugin on openfire which keeps the messages offline, and send them once the client is connected again. In this scenario to receive all messages, 1.1 Device should only disconnected from the openfire in

Smack message listener not called and connection unstable

谁说胖子不能爱 提交于 2019-12-12 10:46:18
问题 I have the following code which should listen for messages: ChatManager chatmanager = ChatManager.getInstanceFor(xmppManager.getConnection()); chat = chatmanager.createChat(otherJabberId); chat.addMessageListener(new ChatMessageListener() { @Override public void processMessage(Chat chat, Message message) { Log.e("message trigger", message.getBody()); } } But my Log never triggers. However, I have setDebuggerEnabled(true) in my code and the following shows up: 10-31 15:41:51.264 28889-28993

xmpp (smack and openfire) get registration state of group of users?

一个人想着一个人 提交于 2019-12-12 04:30:05
问题 I use openfire and smack for presence management in my app. I use phone number as username and wanna get list of registered users that exist in user device contacts list. Is there any way to check user s registration state? 回答1: To determine registered users (just like Whatsapp) you can simply post contact's of user on your server and there you can check which contacts exist in your users table (the table where you keep the entry of new user with his phone number). Based on that data you can

Cannot establish TLS connection to Openfire 4.1.3 server with Smack 4.2 on Android: SSLProtocolException: SSL handshake aborted

落爺英雄遲暮 提交于 2019-12-12 03:39:28
问题 I'm trying to connect to my Openfire 4.1.3 server with Smack 4.2, the current config works ok: XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration.builder(); config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled); config.setXmppDomain(serviceName); config.setHost(context.getString(R.string.server)); config.setHostnameVerifier(verifier); config.setHostAddress(addr); config.setResource("Android"); config.setPort(Integer.parseInt(context.getString(R

Smack - When to call MultiUserChat.Join(…)

社会主义新天地 提交于 2019-12-12 01:47:01
问题 I'm a bit confused and can't find the answer in the docs. I'm developing a simple chat app for Android. I've created a group (muc) and everything works, but do I have to keep calling join() everytime I open the app? I've noticed that it doesn't work otherwise.. Don't understand why since the server knows that my jabberID is connected to this muc. Hope my question is clear enough. Thanks. 回答1: A (I Hope) complete explanation: short answer is yes. When a persistent room is created on your

facebook chat cant work in smack api with android

依然范特西╮ 提交于 2019-12-12 01:35:22
问题 i am developing chat client for my app.now i am testing it on gtalk,facebook,yahoo.iam using smack api for that.i am now successfully tested it on gtalk.But in case of facebook i got error 01-13 10:53:05.938: INFO/XMPPClient(389): [SettingsDialog] Connected to chat.facebook.com 01-13 10:53:07.178: ERROR/XMPPClient(389): [SettingsDialog] Failed to log in as chikka0305@chat.facebook.com 01-13 10:53:07.178: ERROR/XMPPClient(389): SASL authentication failed using mechanism DIGEST-MD5: as you can

XMPP Spring Integration Property or field 'json' cannot be found

巧了我就是萌 提交于 2019-12-12 01:24:40
问题 I tried to implement XMPP with Spring Integration using the following tutorial: https://grokonez.com/spring-framework/spring-integration/firebase-cloud-messaging-xmpp-server-example-receive-upstream-messages-spring-integration However I am getting the following error: org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'json' cannot be found on object of type 'org.jivesoftware.smack.packet.StandardExtensionElement' - maybe not public or not valid? at org

User is still Online although user is not connected to the server. And failed to reconnecting to the server

拟墨画扇 提交于 2019-12-12 01:22:32
问题 I am using smack client in my chat application. Everything is going to be fine but when connection aborted for some reason, my server is showing online for that user JID. My problem is that how to reconnect to the server again after disconnecting. I am able to catch for connection using connection.isAuthenticated() method in my service thread. But unable to reconnect to the server. 回答1: you can enable mod_ping module on server side (ejabberd) to overcome online issue if client disconnect but

How to send a messag to multiple recipients in (a)Smack?

孤人 提交于 2019-12-11 23:13:30
问题 I am wondering if there is a way to set multiple targets for a message instead of sending message to multiple targets separately? for(i = 0; i<x ; i++){ Message msg = new Message("reza@myhostMessage.Type.chat); msg.setBody("HEY"); try { connection.sendPacket(msg); } catch (NotConnectedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } 回答1: Simply use MultiRecipientManager.send(XMPPConnection connection, Packet packet, List<String> to, List<String> cc, List<String>

Handle see-other-host in smack

懵懂的女人 提交于 2019-12-11 18:48:12
问题 I'm trying to use smack in order to connect to Microsoft's Xmpp Msn api. Last april they made a change in their implementation which forces clients to implement the "see-other-host" xmpp specification. When I try to connect to "xmpp.messenger.live.com" I get stream:error (see-other-host) at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:260) at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43) at org.jivesoftware.smack.PacketReader$1.run(PacketReader