Project

General

Profile

Using "amp" to send notification to a client through APN (Apple Push Notification) service

Hamid Alimohammadi
Added over 3 years ago

Hi,

I wonder if anyone can give a hint to my question:

What would be a good approach to use amp to send notifications to an iOS client through APN (Apple Push Notification)?

The purpose is to retrieve and send offline messages to scuh clients.

Thanks in advance for any hint.


Replies (2)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Why AMP specifically?

The most general idea about using APN would be to create new plugin that would process all packets (messages) for the user who is offline (it's session is null) and either connect directly to APN (less optimal) or forward it to dedicated Tigase component which would handle all communication with APN (preferred approach). Afterwards, after client would connect it would retrieve all offline messages from store in regular manner.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 3 years ago

Actually, using AMP for sending/storing messages through other/external services is an interesting idea. However, this implies to modify/extend AMP protocol to add more conditions and actions, such as "store APN" or something like this. However, in most cases you do not really want to modify the client software or even make it aware that a message sent to some destination address is pushed to the offline user through some other media.

Instead you want to make it transparent to the client and entirely implemented on the server side. For this reason I would suggest to implement a new component, similar to the AMP, which would do the APN push under certain conditions. You can either create a new plugin or modify any existing plugin to redirect messages to the new component under certain conditions.

    (1-2/2)