Initial SDK Integration
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 which can found on the App Settings page within 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. Please see the following sections 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”