Push Messaging allows a server to “push” a message to an Aurena Native client, as opposed to the client “pulling” messages from the server. This is achieved through techniques that are dependent on the Aurena Native client platform.
- Android uses Firebase Cloud Messaging (FCM)
- Apple uses Apple Push Notification Service (APNs)
- Windows Runtime uses Windows Notification Service (WNS)
In the rest of this document we call these services the “Platform Notification Service” or PNS.
This document describes the various steps that are performed to enable Push; what can go wrong and how to fix the problem.
A push message will not always get delivered to an Aurena Native client. Each Platform Notification Service only offers “best effort” to deliver a push message.
One Azure Notification Hub is used by each Aurena Native App as a front-end for the various Platform Notification Services.
Aurena Native Notification is the service that communicates directly with Notification hubs to register or send notifications. Aurena Native devices communicate with Aurena Odata Provider when register for Push Messages and OData Provider access the Notification hubs using Aurena Native Notification Service.
Aurena Native Service communicates with the Oracle Database and making sure the push messages are sent to the Notification hubs using Aurena Native Notification Service and then back to the Aurena Native devices.
Aurena Native Notification Service should be protected by firewalls. Push requires a change in the firewall rules.Aurena Native Notification Service must be able to call the Notification Hub for each Aurena Native App.
Register the Aurena Native App¶
Each Aurena Native App must register for Push Notification with the Platform Notification Service (PNS) for each supported client platform. This step is normally performed by the IFS Aurena Native App development team. The registration process yields various IDs and secrets that are configured within the Aurena Native Client App and the Notification Hub.
Create a Notification Hub¶
Each Aurena Native App performs Push through its own Azure Notification Hub. Information (including secrets) from the App registration process (above) is used to configure the Notification Hub. This process yields Notification Hub URL and Path values. Customers can choose to share the same Notification Hub, or they can create their own. No matter what, customers share the same PNS infrastructure.
Configure the Notification Hub connection strings within the IFS Database¶
The Notification Hub URL and path must be configured as Application Parameters, NOTIFICATION_HUB_URL and NOTIFICATION_HUB_PATH. Push is disabled for the Application if these parameters are blank or do not exist. A Notification Hub cannot be used by more than one App. If the Notification Hub URL and Path values are duplicated (and not blank) then at least one set will be for the wrong App.
Push registration in the client¶
When an Aurena Native App is executed and the logged in user wishes to use Push, it contacts the PNS to obtain a “PNS handle”. If the PNS handle has changed since the last time the App was executed or this is the first execution, it is sent to the Aurena OData Provider as a “pushRegistry” action. This action creates a new GUID tag to associate with the device, registers the tag and send the request to Aurena Native Notification Service to handle with the Notification Hub and records the tag, handle and Notification Hub expiry date in the Installed App Details
If the user decides to disable Push for the App, the tag and handle are deleted from the Notification Hub and Push is disabled in the Installed App Details screen.
Remember that each PNS only offers “best effort” to deliver a push message. If a client is consistently not receiving Push notifications, consider and double-check all the above configuration steps.
- Ensure that the various services can connect to each other and that firewalls are not preventing communication.
- Is this App registered with the PNS? A new, development version of an App may need a new App registration so that it does not conflict with an existing, production version of the App. Especially if both versions of the App are installed and can execute on the same device. The device needs to know which App to activate when it receives a Push.
- Does the Notification Hub exist and is it configured correctly? The Notification Hub requires configuration for each required client platform (Google, Apple, Windows). The Azure Notification Hub configuration pages can send test Push notifications to check this.
- Is the correct Notification Hub connection information stored in the Application Parameters table?
- Has the user and device registered for Push notifications? Check the Installed App Details for the device.