Handling Emergency Alert System alerts
Overview
For the US market, OpenTV 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 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
easEventTypeofSTART LIVE, it must:Switch to the live channel specified in
easChannelin the message at the time specified byeasStartTimein the same message.Prevent the user from navigating away from the live channel until it receives a message with an
easEventTypeofSTOP LIVE.When it receives a message of type
STOP LIVE, at the time specified byeasEndTimein the same message, the app should:Switch back to the where the user was before the alert.
Re-enable user navigation.
When it receives a message with an
easEventTypeofSTATIC, it should:Switch to the live channel specified in
easChannelin the message at the time specified ineasStartTime.Prevent the user from navigating away from the live channel until:
The time period specified in
easDurationhas passed, orThe time specified in
easEndTimehas been reached.
When the alert has ended (because the
easDurationtime period has ended, oreasEndTimehas been reached), the app should:Switch back to the where the user was before the alert.
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.
{
"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"
}