OpenTV ENTera & OpenTV Platform Documentation
26.26_Q2 25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2
26.26_Q2 25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2

Message format – general notifications

Overview

An operator can send notifications to client devices using one of the DMM APIs or using Operator Console (OpCon).

Message format

Example payload of a general notification:

JSON
{
  "notification": {
    "body": "20% off all TVOD until Sunday",
    "title": "Discount Movies"
  },
  "data": {
    "body": "20% off all TVOD until Sunday",
    "title": "Discount Movies",
    "referenceType": "NOTIFICATION_UPDATE" 
  }
}

The message is delivered as stringified JSON, and is shown here as regular JSON for readability.

When delivered to the client, the above example JSON will be stringified as follows:

JSON
"{\"notification\":{\"body\":\"20% off all TVOD until Sunday\",\"title\":\"Discount Movies\"},\"data\":{\"body\":\"20% off all TVOD until Sunday\",\"title\":\"Discount Movies\",\"referenceType\":\"NOTIFICATION_UPDATE\"}}"

The client app should check for the presence of a notification block:

  • If a notification block is present, the client should present the notification to the user immediately.

  • If there is no notification block, the client should store the notification so that the user can view it when they choose to (for example, in an inbox).