GroupChat Push Notification on XMPP - ios

We are developing an xmpp application on IOS and Android. We are using ejabberd as the xmpp server and we are also using mod_interact (https://github.com/adamvduke/mod_interact) to inform our webservers to send push notifications to clients for their offline messages:
Flow is like this:
Sender sends the message to ejabberd
Ejabberd receives the message and check if the receipant is online
If the receipant is offline ejabberd saves the offline message
mod_interact works when an offline message received by ejabberd and deliver the message to our webservers
Web server finds the push notification informations about clients and sends the push notification
Its working very well on 1 to 1 chat. But in group chat(MUC) mod_interact doesnt work and I cannot send push notification to group receipants. Do you know any other solutions to fix that problem on both 1 to 1 and group chat.
Thanks

Look into ejabberd_mod_offline_post, it supports both one2one and MUC.
First config the Room must be a Member-Only room, and add all users as members right after you created it, so that be able to get a total.
Add above model into ejabberd models.
Implement a Callback Service to handle the callback post.
The idea is when User go offline:
In one-to-one case, offline_message_hook will be raised
In MUC case, muc_filter_message will be raised, and any one not Presence-Available is offline.

Related

can we send system message to offline users in QuickBlox?

i am developing an ios app integrating it with QuickBlox and i am not using APNS in it. I am using systemMessage service for notifying the newly added members about they are joined to the specific group. The problem is systemMessage notifications are works only for the online users, if a person is offline it didn't work. So can i use any other way for sending notification for offline users without using systemMessage notification service as i am not using APNS.
You are not able to send any notification without APNS if application is not running. In that case you definitely should use APNS.

How to receive offline messages with XMPP in ios

I am working on a chat using XMPP Protocol. Everything is working fine using XMPP. But I'm unable to receive offline messages from agent when user comes to online. As user A is logged out and user B sends messages to user A, and when user A logs into app, it must receive all the messages that were sent by user B during offline session. How can I receive these messages?
With rooms you can do this easily by joining the chat asking history since the time you went offline. For one-to-one chat, you will have to implement per user offline queue at the server end. And notify server once you are online to receive the chats.

iOS Twilio Receive Incoming SMS

I am developing an iOS messaging app that uses Twilio to send and receive SMS and MMS. The tutorial on Twilio about the iOS client seems to only cover outgoing and incoming calls. I understand that sending an SMS/MMS would mean that I send a HTTP request to my server, in which my server sends the request to Twilio in order to complete the sending. However, how would I receive messages on my app?
I know that Twilio numbers have web hooks that execute when the number receives this message, but how would I get this message to my app. I don't believe that there are delegate methods included like the voice ones. The only solution that I could think of right now would be to use push notifications from my server to the phone. Is there any other possible way? Thanks.
I was recently in a similar situation to yours, but my app only cares about receiving a response within a 2 minute window while the app is opened.
Regardless, I would say that your best options include 1) push notifications, 2) sockets (probably via Socket.io), or 3) background polling. If you plan to have your application receive the message agnostic of its state (open, closed, etc), then I would highly suggest using push notifications. I'm using Parse as my Twilio backend and it makes creating and working with push notifications a breeze :)

Regional Monitoring and Push notifications in iOS

I need to update my users for things that happened around their current location while the app is in the background.
To my understanding:
If my server sends a Push Notification to a client, the client would immediately show that message.
I can set up the app so that there is a specific location, with a given radius could fire a message.
So what I want to understand if it is even possible to update my users about things that are new in their locations.
I was thinking of two possible solutions, I am not sure they are possible.
One, I guess if the Push Notifications would allow a function to run prior to its display,
deciding if the message should appear.
For example: something happened in area x,y - The server initiates a message to all devices. Only the devices within range of x,y and a radius z, would show the message to the users.
Maybe the Regional Monitoring service can send a message to my server and my server can then decide if to send a Push Notification back to the client...
For example
The user has entered a defined location, determined by the app. The app sends a message to the server. The server decides if a message is due.
Any ideas? is that even possible?
Filtering push notifications by topic is something you need to do on the server side, not the client side. Apple specifically states not to send messages to users that aren't relevant and you won't be able to block them when the app isn't running. Additionally, if you are using a service to manage your push notifications you don't want to pay for messages that aren't relevant.
So when you register a device into your database, you should register what topics that person is subscribing to (ie. save a list of topics that user is eligible to receive). Then when the event is triggered that generates the push notification only send to devices that are registered to that topic. I believe a number of push platforms have this capability already built in. On UrbanAirship and Azure Notification Hubs you can use their tags feature. Or you can develop it yourself if you do your own push server.
Take a look at Parse. They have this kind of functionality baked right in, just send the push to clients that match a geoPoint query.

Is it possible to implement an IMAP push client in iOS?

Would it be possible for me to implement a client that is capable of receiving IMAP push messages, without the awareness of the user (i.e. they are not displayed in an inbox etc.)
Yes. You can create a job (corn) to check for emails every few often and send a push message (apns) to the user (using your app) with the email message attached as body.

Resources