Skip to main content
Skip table of contents

Handling Emergency Alert System alerts

Overview

For the US market, OpenTV Video Platform supports the Emergency Alert System (EAS) through integration with Digital Alert Systems. This page explains how a client application should handle the EAS messages that the platform sends.

Prerequisites

Before a client application can receive EAS messages from OpenTV Video Platform, it must:

  • Create a device in the platform for the physical device it is running on. (That is, a device ID must have been created for the device.)
  • Register the device with Firebase Cloud Messaging (FCM). This is also required to enable non-EAS messaging, as described in Messages.
  • Register the device with Open Device Messaging (as described in Messages).

Handling EAS messages

A client application should handle the EAS alert messages it receives from FCM (see EAS message format, below) as follows:

  • When it receives a message with an easEventType of START LIVE, it must:
    1. Switch to the live channel specified in easChannel in the message at the time specified by easStartTime in the same message.
    2. Prevent the user from navigating away from the live channel until it receives a message with an easEventType of STOP LIVE.
    3. When it receives a message of type STOP LIVE, at the time specified by easEndTime in the same message, the app should:
      1. Switch back to the where the user was before the alert.
      2. Re-enable user navigation.
  • When it receives a message with an easEventType of STATIC, it should:
    1. Switch to the live channel specified in easChannel in the message at the time specified in easStartTime.
    2. Prevent the user from navigating away from the live channel until:
      • The time period specified in easDuration has passed, or
      • The time specified in easEndTime has been reached.
    3. When the alert has ended (because the easDuration time period has ended, or easEndTime has been reached), the app should:
      1. Switch back to the where the user was before the alert.
      2. Re-enable user navigation.

If the app receives an alert while it is in the background or terminated, when it is brought to the foreground or re-opened, it must switch to the appropriate live channel and disable navigation if the alert is still in effect.

EAS message format

The following is an example of an EAS alert message sent from FCM:

EAS alert messages from Firebase are sent as data messages, not notification messages.

CODE
{
   "sentTime":1597604888495,
   "ttl":2419200,
   "data":{
      "action":{
         "easEventType":"STATIC",
         "easChannel":"GLOBAL_88534",
         "easDuration":180,
         "easDescription":"description",
         "extra":"{}",
         "name":"tune",
         "easType":"RMT",
         "easStartTime":1597604888,
         "easEndTime":1597605068,
         "easFips":"123456"
      }
   },
   "messageId":"0:1597604888521265%ae78e602f9fd7ecd",
   "from":"706132353378"
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.