Skip to content

Commit a15adaf

Browse files
Merge pull request #49 from rudderlabs/release/2.1.0
chore(release): pulling release/2.1.0 into master
2 parents aa0817f + 4ab934f commit a15adaf

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
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.
44

5+
## 2.1.0 (2025-11-27)
6+
7+
8+
### Features
9+
10+
* **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))
11+
512
## 2.0.0 (2025-04-24)
613

714

braze/src/main/java/com/rudderstack/android/integration/braze/BrazeIntegrationFactory.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ enum ConnectionMode {
108108
private static final String CURRENCY_KEY = "currency";
109109
private static final String PRODUCTS_KEY = "products";
110110
private static final String DATA_CENTER_KEY = "dataCenter";
111+
private static final String ANDROID_API_KEY = "androidApiKey";
111112
private static final String API_KEY = "appKey";
113+
private static final String USE_PLATFORM_SPECIFIC_API_KEYS = "usePlatformSpecificApiKeys";
112114
private static final String SUPPORT_DEDUP = "supportDedup";
113115
private static final String PRODUCT_ID_KEY = "product_id";
114116
private static final String QUANTITY_KEY = "quantity";
@@ -167,12 +169,25 @@ private BrazeIntegrationFactory(Object config, RudderClient client, RudderConfig
167169
} else if (RudderClient.getApplication() == null) {
168170
RudderLogger.logError("RudderClient is not initialized correctly. Application is null. Aborting Braze initialization.");
169171
} else {
170-
// get apiKey and return if null or blank
172+
// Start with default API key
171173
if (destinationConfig.containsKey(API_KEY)) {
172174
apiKey = (String) destinationConfig.get(API_KEY);
173175
}
176+
177+
// Override with platform-specific key if configured
178+
if (getBoolean(destinationConfig.get(USE_PLATFORM_SPECIFIC_API_KEYS))) {
179+
String androidApiKey = destinationConfig.containsKey(ANDROID_API_KEY)
180+
? (String) destinationConfig.get(ANDROID_API_KEY)
181+
: "";
182+
183+
if (!TextUtils.isEmpty(androidApiKey)) {
184+
apiKey = androidApiKey;
185+
} else {
186+
RudderLogger.logWarn("BrazeIntegration: Configured to use platform-specific API keys but Android API key is not valid. Falling back to the default API key.");
187+
}
188+
}
174189
if (TextUtils.isEmpty(apiKey)) {
175-
RudderLogger.logError("Invalid api key. Aborting Braze initialization.");
190+
RudderLogger.logError("Invalid API key. Aborting Braze initialization.");
176191
return;
177192
}
178193

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ POM_LICENCE_URL=http://opensource.org/licenses/MIT
77
org.gradle.jvmargs=-Xmx1536m
88
POM_DEVELOPER_ID=Rudderstack
99
POM_LICENCE_NAME=The MIT License (MIT)
10-
VERSION_CODE=5
10+
VERSION_CODE=6
1111
POM_DEVELOPER_NAME=Rudderstack, Inc.
1212
POM_LICENCE_DIST=repo
13-
VERSION_NAME=2.0.0
13+
VERSION_NAME=2.1.0
1414
POM_URL=https://github.com/rudderlabs/rudder-integration-braze-android
1515
POM_SCM_URL=https://github.com/rudderlabs/rudder-integration-braze-android/tree/master
1616
POM_SCM_CONNECTION=scm:git:git://github.com/rudderlabs/rudder-integration-braze-android.git

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.0.0",
2+
"version": "2.1.0",
33
"dependencies": {
44
"properties-reader": "^2.2.0"
55
}

0 commit comments

Comments
 (0)