How the XMPP client must notified of new Message, when app is in background?

余生长醉 提交于 2019-12-02 02:47:01

I founded my answer myself. I developed a local API in my server, to send push notification. This local API will have all the users tokens per jids (when Token generated in my app, sends a packet via rest to my API). When a user is offline, openfire server will use CallBackOnOffline plugin to send POST request containing a JSON of message body and sender and receiver to my local API. Then the API will gets the destination Token from db and sends a request of push to FCM.

Note: CallBackOnOffline has a problem in openfire that not sends POST requests. I solved that too. If anyone faced with this problem, comment it, I'll give it's solution too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!