Initial SDK integration
The Braze Windows SDK is deprecated as of March 24, 2022.
- March 24, 2022: No new Windows apps can be created in the Braze dashboard.
- September 15, 2022: No new messages can be sent to Windows apps. Existing messages and data collection are unaffected.
- January 15, 2023: Braze will no longer serve messages or collect data from Windows apps.
The Braze SDK will provide you with an API to report information to be used in analytics, segmentation, and engagement, as well as the ability to register users for push and receive notifications.
The Windows Universal SDK is also compatible with Xamarin Windows Apps.
Step 1: Install the SDK via the NuGet package manager
The Windows Universal SDK is installed via the NuGet Package Manager. To install the Braze Windows SDK via NuGet:
- Right-click on the project file
- Click on “Manage NuGet Packages”
- Click “Online” in the dropdown menu on the left
- Search in “NuGet.org” for “Appboy”
- Click on the “AppboyPlatform.Universal.Release” NuGet Package and click Install
The Windows Universal Library should be used for all Windows 8.1, Windows Phone 8.1, and UWP applications.
Step 2: Creation and configuration of AppboyConfiguration.xml
Create a file called AppboyConfiguration.xml
in the root directory of your project and add the following code snippet into that file:
1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<AppboyConfig>
<ApiKey>YOUR_API_KEY_HERE</ApiKey>
</AppboyConfig>
Be sure to update
YOUR_API_KEY_HERE
with your API key that can found on the settings page in the Braze dashboard.
Once you’ve added that snippet, be sure to modify the following file properties for AppboyConfiguration.xml
- Set the
Build Action
toContent
- Set
Copy to Output Directory
toCopy Always
Step 3: Configuring package.appxmanifest
Within the “Capabilities tab, ensure Internet (Client)
is checked.
Step 4: Editing your app class
- Add the following to the
usings
of yourApp.xaml.cs
file:
1
2
3
using AppboyPlatform.PCL.Managers;
using AppboyPlatform.Universal;
using AppboyPlatform.Universal.Managers.PushArgs;
- Call the following within your
OnLaunched
lifecycle method:
1
Appboy.SharedInstance.OpenSession();
- Call the following within your
OnSuspending
lifecycle method:
1
Appboy.SharedInstance.CloseSession();
Basic SDK integration complete
Braze should now be collecting data from your application. See the following articles on how to log attributes, events, and purchases to our SDK and how to instrument push messaging.
If you are using the Braze Unity project in the same app, you may have to fully qualify calls to Braze as “AppboyPlatform.Universal.Appboy”