mparticle-integrations / mparticle-android-integration-appboy

Braze (formerly Appboy) integration for the mParticle Android SDK
12 stars 14 forks source link

Braze (formerly Appboy) Kit Integration

This repository contains the Braze integration for the mParticle Android SDK.

Example App

This repository contains an example app showing how to implement mParticle, Braze, and Firebase Cloud Messaging. The key changes you need to make to your app are below, and please also reference mParticle and Braze's documentation:

1. Adding the integration

See a full build.gradle example here

  1. The Braze Kit requires that you add Braze's Maven server to your buildscript:

    repositories {
        maven { url "https://appboy.github.io/appboy-android-sdk/sdk" }
        //Braze's library depends on the Google Support Library
        google()
        ...
    }
  2. Add the kit dependency to your app's build.gradle:

    dependencies {
        implementation 'com.mparticle:android-appboy-kit:5+'
    }

2. Registering for Push

mParticle's SDK takes care of registering for push notifications and passing tokens or instance IDs to the Braze SDK. Follow the mParticle push notification documentation to instrument the SDK for push registration. You can skip over this section of Braze's documentation.

3. Displaying Push

See a full example of an AndroidManifest.xml here.

mParticle's SDK also takes care of capturing incoming push notifications and passing the resulting Intent to Braze's BrazePushReceiver. Follow the mParticle push notification documentation to ensure you add the correct services and receivers to your app's AndroidManifest.xml.

4. Reacting to Push and Deeplinking

There are a wide variety of implementation options available in Braze to deeplink a user when they tap a notification. There are two specific requirements to ensure automatic deeplinking works as intended.

From here you should be able to successfully test push via Braze! Braze offers many client-side configurable options via xml resources and otherwise. Please see review the rest of their documentation here for more information.

License

Apache License 2.0