how to send push notification to offline users of xmpp
Asked Answered
H

2

0

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

Herakleion answered 15/5, 2015 at 7:31 Comment(4)
by offline do you mean device without internet?? or the app is not running?Ebert
@Ebert app is not runningHerakleion
You may try GCM for Android, and APNS for iOSIsaak
@Isaak tnx for your reply but we know how to send push notification throught apns and gcm but we dint know how to integrated it with xmpp and send it to offline usersHerakleion
F
2

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.

Flagstad answered 21/5, 2015 at 7:42 Comment(0)
P
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.

Pusillanimity answered 29/5, 2015 at 12:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.