Braze’s SDKs each come with a sample application within the repository for your convenience. Each of these apps is fully buildable so you can test Braze features alongside implementing them within your own applications. Testing behavior within your own application versus expected behavior and code paths within the sample applications is an excellent way to debug any problems you may run into.
Building the Droidboy test application
Braze’s test application within the Android SDK GitHub repository is called Droidboy. Follow these instructions to build a fully functional copy of it alongside your project.
- Create a new app group and note the Braze API identifier key.
- Copy your FCM sender ID and Braze API identifier key into the appropriate places within
/droidboy/res/values/braze.xml(in between the tags for the strings named
- Copy your FCM server key and server ID into your app group settings under Manage Settings.
- To assemble the Droidboy APK, run
./gradlew assemblewithin the SDK directory. Use
- To automatically install the Droidboy APK on a test device, run
./gradlew installDebugwithin the SDK directory:
Building the Hello Braze test application
The Hello Braze test application shows a minimal use case of the Braze SDK and additionally shows how to easily integrate the Braze SDK into a Gradle project.
- Copy your API identifier key from the Manage Settings page into your
braze.xmlfile in the
- To install the sample app to a device or emulator, run the following command within the SDK directory:
If you don’t have your
ANDROID_HOMEvariable properly set or don’t have a
local.propertiesfolder with a valid
sdk.dirfolder, this plugin will also install the base SDK for you. See the plugin repo for more information.
For more information on the Android SDK build system, see the Github Repository README.