Skip to content

Push notifications

Learn how to set up push notifications for the Unreal Engine Braze SDK.

Prerequisites

Before you can use this feature, you’ll need to integrate the Unreal Engine Braze SDK.

Setting up push notifications

Step 1: Set up your project

First, add Firebase to your Android project. For step-by-step instructions, see Google’s Firebase setup guide.

Before you can send an iOS push notification using Braze, you must provide your .p8 push notification file provided by Apple. As described on the Apple developer documentation:

  1. In your Apple developer account, go to Certificates, Identifiers & Profiles.
  2. Under Keys, select All and click the add button (+) in the upper-right corner.
  3. Under Key Description, enter a unique name for the signing key.
  4. Under Key Services, select the Apple Push Notification service (APNs) checkbox, then click Continue. Click Confirm.
  5. Note the key ID. Click Download to generate and download the key. Make sure to save the downloaded file in a secure place, as you cannot download this more than once.
  6. In Braze, go to Settings > App Settings and upload the .p8 file under Apple Push Certificate. You can upload either your development or production push certificate. To test push notifications after your app is live in the App Store, its recommended to set up a separate workspace for the development version of your app.
  7. When prompted, enter your app’s bundle ID, key ID, and team ID, then click Save.

Step 2: Enable push notifications

Add the following lines to your project’s engine.ini file. Be sure to replace YOUR_SEND_ID with the Sender ID in your Firebase Project.

1
2
3
bEnableFirebaseCloudMessagingSupport=true
bIsFirebaseCloudMessagingRegistrationEnabled=true
FirebaseCloudMessagingSenderIdKey=YOUR_SENDER_ID

Within the same directory as BrazeUPLAndroid.xml, create a new directory named AndroidCopies and add your google-services.json file to it.

In your project, go to Settings > Project Settings > iOS > Online then check Enable Remote Notifications Support. When you’re finished, verify that your provision has push capabilities enabled.

Optional configurations

Setting small and large icons

To set the small and large notification icons:

  1. Add icons to the appropriate drawable folder (drawable by default) inside of the AndroidCopies/res folder.
  2. Add braze.xml to the AndroidCopies/res/values folder to set the icons. A very basic braze.xml file:
    1
    2
    3
    4
    5
    
     <?xml version="1.0" encoding="utf-8"?>
     <resources>
         <drawable name="com_braze_push_small_notification_icon">@drawable/notification_small_icon</drawable>
         <drawable name="com_braze_push_large_notification_icon">@drawable/notification_large_icon</drawable>
     </resources>
    

Remote launch notifications

As of Unreal Engine version 4.25.3, UE4 lacks proper support to receive a remote notification that causes the initial launch of the application. In order to support receiving this notification, we’ve created two git patches to apply - one for UE4 and one for the Braze SDK plugin.

  1. In your UE4 Engine Source directory, apply the git patch UE4_Engine-Cache-Launch-Remote-Notification.patch.
  2. In your Braze Unreal SDK directory, apply the git patch Braze_SDK-Read-Cached-Remote-Launch-Notification.patch.
HOW HELPFUL WAS THIS PAGE?
New Stuff!