用户离线时的Openfire发送推送通知 [英] Openfire Sending Push notification when user is offline
问题描述
我正在使用openfire 3.9.3服务器,并使用Android和IOS作为客户端. 收件人用户离线时,我想通过推送通知向两个客户端发送消息. 发送推送后,发件人应该会收到消息.
I am using openfire 3.9.3 server and Android and IOS as client. I want to send messages via push notification to both clients when recipient user is offline. And when push is sent sender should get message receipt.
为此,我尝试了:
-
制作拦截器:在这种情况下,我没有得到任何可以跟踪的异常或消息失败.
making interceptor: In this, i didn't get any exception or message failure for which i can track.
还修改openfire代码.但是我认为这不是一个很好的解决方案.
modify openfire code also. But i don't think it is a good solution.
我只想知道,是否有任何插件或修改openfire代码是它的最后解决方案?
I just want to know that, is there any plugin for it or modifying the openfire code is the last solution for it?
推荐答案
好,我在搜索和阅读文档后得到了答案.
Ok I got the answer after searching and reading docs..
Openfire提供自定义插件支持.因此,我为此创建了自己的插件来支持此功能.
Openfire provides custom plugin support. So I created my own plugin for it that supports this feature.
此处更好Openfire插件开发的分步说明.
Here is a better step-by-step explanation for openfire plugin development.
简而言之,
在按照文档.
- 实施openfire插件界面,
- 在plugin.xml中为您的插件类输入一个条目,
- 将您的数据库放入数据库文件夹中,
- 在插件类中初始化拦截器.
- 使用蚂蚁工具构建它.
- 通过管理面板将生成的jar上传到openfire插件列表中.
这篇关于用户离线时的Openfire发送推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!