showToaster()

    showToaster()


    Article summary

    showToaster()

    Displays a notification (or "toaster") in the upper right quadrant of the TV screen. The method accepts a messageIdentifier that is predefined by Comcast. The identifier is used to look up the actual message text that will be displayed on the notification.

    Signature:

    $badger.showToaster(messageIdentifier)

    Parameters:

    parameterdescriptiondata typerequired?
    messageIdentifierAn identifier to a message that is predefined by Comcast. For mandatory integration, the parameter is ExitMessage.PressExitStringYes

    Return Values:

    None.

    Usage Example:

    When an X1 App calls the method below a notification with the message "Press EXIT or MENU close this app" will be shown to a user and auto timeout after 10s. For Smart TV Device, the notification will read "Press HOME to close this app".

    $badger.showToaster('ExitMessage.PressExit');
    

    Mandatory integration:

    When a customer launches content from a deep link, $badger.showToaster('ExitMessage.PressExit'); must be called on the first playback in an app session when:

    • the credits start;

    • the notification that another asset is about to autoplay appears;

    • or the video asset is 15 seconds from completion.

    This does not apply to explicit app launches, only to content launches. Do not call showToaster on subsequent playback within the same app session (example: the user autoplays the next content item after the first completes).


    Was this article helpful?

    What's Next