Difference between revisions of "Push notifications automated"

From Ethora iOS & Android ERC-20 & NFT tokenized community platform
Jump to navigation Jump to search
 
Line 50: Line 50:
* '''mucName :: string()''' - the name of the chat room / space  
* '''mucName :: string()''' - the name of the chat room / space  


Please ensure that you program your bot / agent to include the above information otherwise the push notifications will include the long hash address (wallet address) of the sender which isn't really human readable!See also: [[Push notifications (manual / marketing)|Manual informative / marketing push notifications]]
Please ensure that you program your bot / agent to include the above information otherwise the push notifications will include the long hash address (wallet address) of the sender which isn't really human readable
 
== See also ==
 
* [[Push notifications (manual / marketing)|Manual informative / marketing push notifications]]

Latest revision as of 09:51, 2 June 2022

Automated or Transactional Push notifications is an important re-engagement and re-activation mechanism for your Application / Ecosystem and simply a convenience improving the users experience.

Under "transactional" here we mean the push notifications that are triggered by some event that happens inside the application / ecosystem, for example a message is sent in a chat/space that you follow, you receive a token transfer etc.

When Push notifications are triggered

When an action occurs in the Application that may be of interest to the User, and the user is not running the Application at the moment, Ethora engine sends a push notification that is displayed on the User's smartphone screen upon receipt.

Push notifications scenarios

Scenarios in which the user receives push notifications:

  • Messages sent by other users to the Chat Room to which the user is subscribed (depending on User's notification settings within the specific room)
  • Transfer of Coins or Items in a Chat Room (Space) to the specific User

Developers information

How transactional Push Notification work in Ethora for chat messages

Push Notification works via our custom made plugin for the Ejabberd chat server.

The plugin written in Erlang scans chat messages and also has access to a database of mobile device IDs (Android and iOS smartphones) against user IDs (ETH wallet addresses) which are stored in a column-based NoSQL database (Cassandra in current implementation).

Once plugin detects users who are offline it forms and queues Push Notifications to their devices, to notify the offline users of the messages they might have missed in the chats they follow.

VoIP Push Notifications for Audio / Video calls

The same plugin (with a different modifier flag) also supports VoIP Push Notifications to support Voice and Video calls in Ethora engine.

The plugin detects if the message is of a VoIP type following the flags in the "data" section of the XMPP stanza payload.

Client applications, on their side, don't display such technical "signalling" messages as normal chat messages.

In case a VoIP-related signalling type XMPP message is detected, the server-side plugin forms a VoIP type push notification which is treated differently by Apple and Google Push Notification Services. Such message is scheduled for an immediate delivery so it:

(1) can come through quickly;

(2) tells the smartphone OS that the "sleeping" app from the background should be promptly brought to the foreground and that this network traffic should be prioritized;

(3) notifies the app that it should display the corresponding modal UI for the incoming Audio or Video call respectively

Note: you should use the VoIP type messages with care and make sure you handle them correctly on the receiving side. In case you don't place the Audio/Video call connection on the client side upon receiving the VoIP push, the Apple / Google servers can put your app on a temporary 'ban' for 'crying wolf' without the need. This is done so that VoIP type pushes aren't used for delivering normal non-urgent messages.

XMPP Stanza format for Push Notification (Attn: Bot / 3rd party Agents developers)

This information is for the attention of those developers who may be developing 3rd party agents that interact with Ethora and Dappros Platform infrastructure.

You may disregard this section in case, like most, you are only using the Ethora engine and you don't plan to develop any custom clients, bots or agents.

In order for the Push Notifications to display the names of the sending users / agents and the name of the chat room correctly, please ensure that you include the following payload into the "data" section of your XMPP messages stanzas formed by your bot / agent / custom client app:

  • senderFirstName :: string() sender - the first name of the message sender
  • LastName :: string() - the last name of the message sender
  • mucName :: string() - the name of the chat room / space

Please ensure that you program your bot / agent to include the above information otherwise the push notifications will include the long hash address (wallet address) of the sender which isn't really human readable

See also