Listen to Broadcast

API 3.0

Touch Portal will send messages to the plug-in at certain events. Currently the only message that is broadcast is the page change event. You can use this broadcast for example to resend states whenever a page is loaded. This will allow the user to get the latest states just as a page is loaded. Here is an example of the message received:

{
  "type":"broadcast",
  "event":"pageChange",
  "pageName":"Media Control Page"
}
Key Type Req. API Description
type Text yes 3.0 The "broadcast" corresponts to a message type that is send from Touch Portal to all plug-ins. This is information non specific to your plug-in.
event Text yes 3.0 The type of broadcast event that is triggered. Currently only the "pageChange" is supported.
pageName Text No 3.0 The value will be send only when the broadcast is of the type "pageChange".