Messaging Configuring
The SmartTUBE is able to send Information Messages and Event-driven Notifications to the end-user devices using Long Polling or Push methods. From the user side, they differ in that Push notifications can be displayed on the device regardless of whether the SmartTUBE app is running or not. The Long Polling method displays messages only when the SmartTUBE application is open.
How the Long Polling Notifications Work
- The SmartTUBE front-end server and the app support a special set of notification commands (including commands for displaying the Simple and Watermark messages)
- The SmartTUBE app maintains a permanent session with the front-end server on which Long Polling is configured and subscribes to notifications (using the SmartTUBE End-User Device API method notifications/subscribe).
- When you submit the message sending in the SmartTUBE Admin Console > Messages menu, the SmartTUBE SDP server generates a notification to the Long Polling server in the following format: http[s]://[long_polling_server_host]:[port]/api/v1/notifications/notify?notification=command?uuid=[device_UID]&[notification_string]
- The Long Polling server passes the notification to the SmartTUBE apps subscribed to this notification.
- Upon the notification receipt, the SmartTUBE app displays the message text on a screen.
- Devices that were offline when the message sending occurred receive actual messages at startup using the messages/list method.
Configuring the Long Polling Notifications
Typically, the Long Polling technique is used by default and available to the SmartTUBE operator out of the box.
How the Push Notifications Work
The implementation of Push notifications for Android and iOS platforms is illustrated below:
Configuring the Push Notifications
To enable the Push notifications:
- Add the following settings to the configuration file /opt/smartlabs/smarttube5/conf/data-server.conf on the SmartTUBE data-server, adapting them to your case:
component ={ properties { # PUSH notification settings for Apple devices applePush = { |
- SmartTUBE apps, when launched, download a configuration file from the SmartTUBE cache-server containing settings common to all subscribers of the operator. So you need to add the following parameter to the configuration file /opt/smartlabs/nginx/html/srv-pub/networkConfig/config.cfg of the SmartTUBE cache-server:
pushNotificationsEnabled = true // Flag to enable the Push notifications for the Simple and Event-driven notifications by default |
Another option is to add this parameter to the setup.json file for specific devices using the SmartTUBE Device Manager.
- Please also check with a SmartLabs representative if the version of your SmartTUBE apps support Push notifications.