how to send push notification to offline users of xmpp

霸气de小男生 提交于 2019-12-12 06:01:27

问题


we are working on an real time ios and android application for that we are using xmpp protocol and openfire server but now we are facing a problem that when a user is offline he will not get message but we have to send them a push notification like watsapp but we dint get any option in openfire to do it

after some research i got xep-0085 and got to know that it can send push notification if user is offline

but it dint get from where i have to upload apple certificate to send push notification can it send push notification without certificate ?

any help will be appreciated


回答1:


It would be easier to use Parse or something similar for push notifications, you can use it for both android and ios.

another option is to expand your systems functionality a little bit, and add a web service that correlates to the application and sends the pushes, that can give you some more control over syncing.




回答2:


You can check receiver is offline or not using below method.

- (void)xmppRoom:(XMPPRoom *)sender didFetchModeratorsList:(NSArray *)items

If your friend is offline than you have to upload message/image to particular server using web service. when your friend will become online than after success connect to xmpp stream he has to call web services for get offline messages. Using this you can easily manage offline messages. I had done this and works fine for me. Let me know if any help.



来源:https://stackoverflow.com/questions/30253948/how-to-send-push-notification-to-offline-users-of-xmpp

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