Android TV Push Implementation

TV icon

While not a native feature, Android TV Push integration is made possible by leveraging the Braze Android SDK and Firebase Cloud Messaging to register a push token for Android TV. It is, however, necessary to build a UI to display the notification payload once it is received. The steps to do so are detailed below.

Push Set Up

  • Step 1: Integrate Braze Android SDK
    First, you must integrate the Braze Android SDK (If not already completed).

  • Step 2: Integrate Push Notifications
    Next, you must integrate the Android Push Notifications (If not already completed).

  • Step 3: Create Custom Toast View
    Next, you will need to create a custom toast view in order for the app to display your notifications. Please refer to Google Documentation on how to do this.

  • Step 4: Create a Custom Notification Factory
    Lastly, you must create a custom notification factory. This will be used to override the default SDK behavior and allow you to manually display the notifications. By returning null, this will prevent the SDK from processing and will require custom code to display the notification. Please reference our Braze documentation that describes how to do this.

Once these steps have been completed, you can start sending push to Android TV!

  • Step 5 (Optional): Set Up Click Analytics Tracking
    In order to track click analytics effectively, it is necessary to handle this manually, as Braze does not handle the display of the messages automatically. This can be achieved by creating a custom BroadcastReceiver to listen for Braze push opened and received intents. Details on how to set this up can be found in the documentation.

Note that these notifications will not persist and will only be visible to the user at the point the device displays them. This is due to Android TV’s notification center not supporting historical notifications.

How to Test Push on Android TV

To test if you push implementation is successful, send a notification from the Braze dashboard as you would normally for an Android device.

  • If Application is Closed: The Push message will display a toast notification in the corner of the screen. Android TV Push Example
  • If Application is Open: You have the opportunity to display the message in your own hosted UI, we recommend following the UI styling of our Android Mobile SDK in-app messages.

Additional Information

For a marketing end user in Braze, launching a campaign to Android TV will be identical to launching a Push to Android Mobile apps, to target these devices exclusively, we recommend selecting the Android TV App in segmentation.

The delivered/clicked response returned by FCM will follow the same convention as a mobile Android device, therefore, any errors will be visible in the Message Activity Log.

WAS THIS PAGE HELPFUL?
New Stuff!