Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 2.1.0 (2025-11-27)


### Features

* **braze:** add support for platform-specific app keys ([#48](https://github.com/rudderlabs/rudder-integration-braze-android/issues/48)) ([92cbd53](https://github.com/rudderlabs/rudder-integration-braze-android/commit/92cbd535c73bad3abfba71b9c2d0a21b11f66826))

## 2.0.0 (2025-04-24)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ enum ConnectionMode {
private static final String CURRENCY_KEY = "currency";
private static final String PRODUCTS_KEY = "products";
private static final String DATA_CENTER_KEY = "dataCenter";
private static final String ANDROID_API_KEY = "androidApiKey";
private static final String API_KEY = "appKey";
private static final String USE_PLATFORM_SPECIFIC_API_KEYS = "usePlatformSpecificApiKeys";
private static final String SUPPORT_DEDUP = "supportDedup";
private static final String PRODUCT_ID_KEY = "product_id";
private static final String QUANTITY_KEY = "quantity";
Expand Down Expand Up @@ -167,12 +169,25 @@ private BrazeIntegrationFactory(Object config, RudderClient client, RudderConfig
} else if (RudderClient.getApplication() == null) {
RudderLogger.logError("RudderClient is not initialized correctly. Application is null. Aborting Braze initialization.");
} else {
// get apiKey and return if null or blank
// Start with default API key
if (destinationConfig.containsKey(API_KEY)) {
apiKey = (String) destinationConfig.get(API_KEY);
}

// Override with platform-specific key if configured
if (getBoolean(destinationConfig.get(USE_PLATFORM_SPECIFIC_API_KEYS))) {
String androidApiKey = destinationConfig.containsKey(ANDROID_API_KEY)
? (String) destinationConfig.get(ANDROID_API_KEY)
: "";

if (!TextUtils.isEmpty(androidApiKey)) {
apiKey = androidApiKey;
} else {
RudderLogger.logWarn("BrazeIntegration: Configured to use platform-specific API keys but Android API key is not valid. Falling back to the default API key.");
}
}
if (TextUtils.isEmpty(apiKey)) {
RudderLogger.logError("Invalid api key. Aborting Braze initialization.");
RudderLogger.logError("Invalid API key. Aborting Braze initialization.");
return;
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ POM_LICENCE_URL=http://opensource.org/licenses/MIT
org.gradle.jvmargs=-Xmx1536m
POM_DEVELOPER_ID=Rudderstack
POM_LICENCE_NAME=The MIT License (MIT)
VERSION_CODE=5
VERSION_CODE=6
POM_DEVELOPER_NAME=Rudderstack, Inc.
POM_LICENCE_DIST=repo
VERSION_NAME=2.0.0
VERSION_NAME=2.1.0
POM_URL=https://github.com/rudderlabs/rudder-integration-braze-android
POM_SCM_URL=https://github.com/rudderlabs/rudder-integration-braze-android/tree/master
POM_SCM_CONNECTION=scm:git:git://github.com/rudderlabs/rudder-integration-braze-android.git
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.0",
"version": "2.1.0",
"dependencies": {
"properties-reader": "^2.2.0"
}
Expand Down
Loading