Android TV push
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 after it is received.
Implementation
- Integrate the Braze Android SDK
First, you must integrate the Braze Android SDK (If not already completed). - Integrate push notifications
Next, you must integrate Android Push Notifications (If not already completed). - Create a custom toast view
Next, create a custom view in your app to display your notifications. - Create a custom notification factory
Lastly, you must create a custom notification factory. This will override the default SDK behavior and allow you to manually display the notifications. By returningnull
, this will prevent the SDK from processing and will require custom code to display the notification. After these steps have been completed, you can start sending push to Android TV! - Set up click analytics tracking (optional)
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 push callback to listen for Braze push opened and received intents.
Note that these notifications will not persist and will only be visible to the user when 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 your push implementation is successful, send a notification from the Braze dashboard as you would normally for an Android device.
- If the application is closed: The push message will display a toast notification on the screen.
- If the 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 and 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.