smack

IM群聊消息的已读回执功能该怎么实现?

懵懂的女人 提交于 2021-02-15 02:33:41
本文引用了架构师之路公众号作者沈剑的文章,内容有改动,感谢原作者。 1、前言 我们平时在使用即时通讯应用时候,每当发出一条聊天消息,都希望对方尽快看到,并尽快回复,但对方到底有没有真的看到?我却并不知道。 一个残酷的现实是,很多时候对方其实是早就已经看到了这条消息,但出出种种原因(大家都懂的),通常都是默默返回——假装没看见。 像微信这样的熟人社交工具,在产品的设计理念上,为了保持使用者的隐私性,在线状态、已读回执等涉及隐私的功能,都没有提供。但很多时候,尤其商务、办公场合下,特别需要一种强反馈的工具,这对于打造高效的团队很有帮助(虽然员工很反感,但老板都喜欢这样的功能,哈哈)。 目前市面上主流的移动端IM里,提供了已读回执的主要有阿里的钉钉、网易的易信、阿里的旺旺,如下图所示: ▲ 上图从左至右分别为:钉钉、易信、旺旺(千牛) 以阿里的钉钉为例,钉钉的产品定位是用于商务交流,其“强制已读回执”功能,让职场人无法再“假装不在线”、“假装没收到”。更有甚者,钉钉的群聊“强制已读回执”功能,甚至能够知道谁读了消息,谁没有读消息(老板的福音啊)。 那么群聊消息的收发流程、消息的送达保证、已读回执机制,到底该怎么实现呢?这就是今天要讨论的话题。 学习交流: - 即时通讯开发交流3群: 185926912 [推荐] - 移动端IM开发入门文章:《 新手入门一篇就够:从零开发移动端IM 》

Failed to transfer file using smack 'XMPPError: service-unavailable - cancel'

ぐ巨炮叔叔 提交于 2020-05-29 09:50:06
问题 I'm trying to transfer file using smack extension library 4.2.0 but couldn't able to successfully transfer file. When i try to transfer file this is the error I'm getting org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from 252615100006@server/Smack: XMPPError: service-unavailable - cancel Even though the peer 00006 is online but I don't why I'm receiving error from the peer This is my code to transfer file public void sendImageMessage(String sendTo, String

How to configure Push mode configuration in XMPP with FCM refresh token using smack in android?

こ雲淡風輕ζ 提交于 2020-03-16 05:46:32
问题 Currently i'm using smack library for XMPP configuration and I want to do XMPP connection of Ejabberd to firebase by send RefreshToken to XMPP. I need to close connection when application is in background or kill and receive notification from Firebase but how can i send refresh token and other param as below using smack library? At the start of each session the user must register to a push mechanism. Depending on the chosen mechanism, several parameters can be passed. The push configuration

Issue in blocking user in chatlist using smack and open fire server

烈酒焚心 提交于 2020-02-19 17:07:35
问题 I want to block a particular friend from my chat list with XMPP . code works fine. There is no Exception, but I am not able to block a user. I'm using open fire server. what changes should i made on server? Can u guys have any idea? My code: public void XMPPAddNewPrivacyList(Connection connection, String userName) { String listName = "newList"; // Create the list of PrivacyItem that will allow or // deny some privacy aspect List<PrivacyItem> privacyItems = new Vector<PrivacyItem>();

Issue in blocking user in chatlist using smack and open fire server

半世苍凉 提交于 2020-02-19 16:56:22
问题 I want to block a particular friend from my chat list with XMPP . code works fine. There is no Exception, but I am not able to block a user. I'm using open fire server. what changes should i made on server? Can u guys have any idea? My code: public void XMPPAddNewPrivacyList(Connection connection, String userName) { String listName = "newList"; // Create the list of PrivacyItem that will allow or // deny some privacy aspect List<PrivacyItem> privacyItems = new Vector<PrivacyItem>();

How to accept invitation in MUC?

天涯浪子 提交于 2020-02-06 08:36:11
问题 I am developing chat application with xmpp. I have created group using MUC and sent invitation to other user. but i don't know how to accept and decline invitation. here is my code to send invitation : EntityBareJid userInviteJID = JidCreate.entityBareFrom("user2@servicename"); muc2.invite(userInviteJID, "Meet me in this excellent room"); I have tried MultiUserChat.decline(conn, room, inviter.asBareJid()s, "I'm busy right now"); method inside invitationReceived() method. but the problem is

Android/Eclipse Error - “Could not find class 'org.jivesoftware.smack.ConnectionConfiguration', referenced from method”

半世苍凉 提交于 2020-01-30 03:27:06
问题 This is my first time working with Android/Java. I am trying to run this basic code and I keep getting the following error: "Could not find class 'org.jivesoftware.smack.ConnectionConfiguration', referenced from method" My code: package message.pack; import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import android.app.Activity; import android.os.Bundle; public class ThesimpleigniteandroidActivity

GCM connection error

主宰稳场 提交于 2020-01-24 00:18:29
问题 I am trying out implementing gcm server application using XMPP(CCS) and i cant able to connect to the google servers. I am trying out the sample code from http://developer.android.com/google/gcm/ccs.html when i try to connect ccsClient.connect(userName, password); i get the following error gcm.googleapis.com:5235 Exception: XMPPError connecting to gcm.googleapis.com:5235.; : remote-server-error(502) -- caused by: XMPPError connecting to gcm.googleapis.com:5235.: remote-server-error(502)

Smack 4.1 SASL authentication error

柔情痞子 提交于 2020-01-21 11:48:48
问题 I am using Smack 4.1 native library for android to develop a chat application. I'm able to set a connection between my application and my server but I'm getting SmackException regarding SASL authentication while logging in. Points to be noted. There is no SASL authentication required on my server side. My application is not crashing but getting the following errors which i have shown below in my log cat snnippet. I'm using eclipse Luna and JDK version 1.7 and I have included the following

Smack 4.1 SASL authentication error

Deadly 提交于 2020-01-21 11:48:26
问题 I am using Smack 4.1 native library for android to develop a chat application. I'm able to set a connection between my application and my server but I'm getting SmackException regarding SASL authentication while logging in. Points to be noted. There is no SASL authentication required on my server side. My application is not crashing but getting the following errors which i have shown below in my log cat snnippet. I'm using eclipse Luna and JDK version 1.7 and I have included the following