Skip to content

Commit

Permalink
Merge pull request #8383 from braze-inc/develop
Browse files Browse the repository at this point in the history
Leftover deploy - November 7, 2024
  • Loading branch information
josh-mccrowell-braze authored Nov 7, 2024
2 parents 6b82732 + 5a7ab13 commit 4292ce3
Show file tree
Hide file tree
Showing 415 changed files with 9,650 additions and 3,424 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
nav_title: SDK Authentication
article_title: SDK Authentication
page_order: 1
page_order: 12
description: "This reference article covers SDK authentication and how to enable this feature in the Braze SDK."
platform:
- iOS
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
page_order: 21
nav_title: SDK Changelogs
page_order: 90
nav_title: Changelogs
layout: dev_guide
guide_top_header: "Braze SDK Changelogs"
guide_top_text: "The following changelogs for each SDK are available within Braze Docs or in their individual GitHub repositories."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
nav_title: Content Cards
article_title: Content Card Customization
layout: dev_guide
page_order: 2
page_order: 5
channel:
- content cards
platform:
Expand Down
6 changes: 0 additions & 6 deletions _docs/_developer_guide/customization_guides.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
nav_title: SDK Debugging
article_title: Debugging the Braze SDK
description: "Learn how to use the Braze SDK debugger, so you can troubleshoot issues for your SDK-powered channels, without enabling verbose logging in your app manually."
page_order: 3
page_order: 13
---

# Debugging the Braze SDK
Expand Down
2 changes: 1 addition & 1 deletion _docs/_developer_guide/disclosures.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
nav_title: Disclosures
article_title: Disclosures and Qualifications
layout: dev_guide
page_order: 4
page_order: 100
guide_top_header: "Disclosures"
guide_top_text: "Braze has you covered! Check out the following articles!"

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
page_order: 0
page_order: 1
nav_title: Getting Started
article_title: Getting Started
layout: dev_guide
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
nav_title: Customization Overview
article_title: Customization Overview
page_order: 1
page_order: 10
description: "This reference article covers the essential concepts of customizing and extending the SDK messaging channels."

---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
nav_title: SDK Overview for Developers
nav_title: SDK Overview
article_title: SDK Overview for Developers
description: "This onboarding reference article provides a technical overview for developers of the Braze SDK. It discusses default analytics tracked by the SDK, blocking automatic data collection, and the live SDK version of your app."
page_order: 0
Expand Down
4 changes: 2 additions & 2 deletions _docs/_developer_guide/platform_integration_guides.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
nav_title: Platform Integration Guides
nav_title: Platforms
config_only: true
noindex: true
layout: blank_config
page_order: 2
page_order: 10
---
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mFirebaseAnalytics.logEvent("played song", params);
val params = Bundle()
params.putString("genre", "pop")
params.putInt("number of times listened", 42);
mFirebaseAnalytics!!logEvent("played song", params)
mFirebaseAnalytics.logEvent("played song", params)
```

{% endtab %}
Expand All @@ -97,7 +97,7 @@ mFirebaseAnalytics.logEvent("customAttribute", params);
val params = Bundle()
params.putString("customAttributeKey", "favorite song")
params.putString("customAttributeValue", "Private Eyes")
mFirebaseAnalytics!!.logEvent("customAttribute", params)
mFirebaseAnalytics.logEvent("customAttribute", params)
```

{% endtab %}
Expand All @@ -122,7 +122,7 @@ mFirebaseAnalytics.logEvent("changeUser", params);
```kotlin
val params = Bundle()
params.putString("externalUserId", userId)
mFirebaseAnalytics!!.logEvent("changeUser", params)
mFirebaseAnalytics.logEvent("changeUser", params)
```

{% endtab %}
Expand Down Expand Up @@ -241,28 +241,27 @@ public class BrazeGtmTagProvider implements CustomTagProvider {
String key = String.valueOf(tagParameterMap.get(CUSTOM_ATTRIBUTE_KEY));
Object value = tagParameterMap.get(CUSTOM_ATTRIBUTE_VALUE_KEY);

BrazeUser brazeUser = Braze.getInstance(sApplicationContext).getCurrentUser();
if (brazeUser == null) {
BrazeLogger.w(TAG, "BrazeUser was null. Returning.");
return;
}

if (value instanceof Boolean) {
brazeUser.setCustomUserAttribute(key, (Boolean) value);
} else if (value instanceof Integer) {
brazeUser.setCustomUserAttribute(key, (Integer) value);
} else if (value instanceof Long) {
brazeUser.setCustomUserAttribute(key, (Long) value);
} else if (value instanceof String) {
brazeUser.setCustomUserAttribute(key, (String) value);
} else if (value instanceof Double) {
brazeUser.setCustomUserAttribute(key, (Double) value);
} else if (value instanceof Float) {
brazeUser.setCustomUserAttribute(key, (Float) value);
} else {
BrazeLogger.w(TAG, "Failed to parse value into a custom "
+ "attribute accepted type. Key: '" + key + "' Value: '" + value + "'");
}
Braze.getInstance(sApplicationContext).getCurrentUser(new IValueCallback<BrazeUser>() {
@Override
public void onSuccess(BrazeUser brazeUser) {
if (value instanceof Boolean) {
brazeUser.setCustomUserAttribute(key, (Boolean) value);
} else if (value instanceof Integer) {
brazeUser.setCustomUserAttribute(key, (Integer) value);
} else if (value instanceof Long) {
brazeUser.setCustomUserAttribute(key, (Long) value);
} else if (value instanceof String) {
brazeUser.setCustomUserAttribute(key, (String) value);
} else if (value instanceof Double) {
brazeUser.setCustomUserAttribute(key, (Double) value);
} else if (value instanceof Float) {
brazeUser.setCustomUserAttribute(key, (Float) value);
} else {
BrazeLogger.w(TAG, "Failed to parse value into a custom "
+ "attribute accepted type. Key: '" + key + "' Value: '" + value + "'");
}
}
});
}

private void changeUser(Map<String, Object> tagParameterMap) {
Expand Down Expand Up @@ -329,21 +328,19 @@ class BrazeGtmTagProvider : CustomTagProvider {
val key = tagParameterMap[CUSTOM_ATTRIBUTE_KEY].toString()
val value = tagParameterMap[CUSTOM_ATTRIBUTE_VALUE_KEY]

val brazeUser = Braze.getInstance(sApplicationContext).currentUser
if (brazeUser == null) {
BrazeLogger.w(TAG, "BrazeUser was null. Returning.")
return
}

when (value) {
is Boolean -> brazeUser.setCustomUserAttribute(key, (value as Boolean?)!!)
is Int -> brazeUser.setCustomUserAttribute(key, (value as Int?)!!)
is Long -> brazeUser.setCustomUserAttribute(key, (value as Long?)!!)
is String -> brazeUser.setCustomUserAttribute(key, value as String?)
is Double -> brazeUser.setCustomUserAttribute(key, (value as Double?)!!)
is Float -> brazeUser.setCustomUserAttribute(key, (value as Float?)!!)
else -> BrazeLogger.w(TAG, "Failed to parse value into a custom "
+ "attribute accepted type. Key: '" + key + "' Value: '" + value + "'")
Braze.getInstance(sApplicationContext).getCurrentUser { brazeUser ->
when (value) {
is Boolean -> brazeUser.setCustomUserAttribute(key, value)
is Int -> brazeUser.setCustomUserAttribute(key, value)
is Long -> brazeUser.setCustomUserAttribute(key, value)
is String -> brazeUser.setCustomUserAttribute(key, value)
is Double -> brazeUser.setCustomUserAttribute(key, value)
is Float -> brazeUser.setCustomUserAttribute(key, value)
else -> BrazeLogger.w(
TAG, "Failed to parse value into a custom "
+ "attribute accepted type. Key: '" + key + "' Value: '" + value + "'"
)
}
}
}

Expand All @@ -353,7 +350,7 @@ class BrazeGtmTagProvider : CustomTagProvider {
}

companion object {
private val TAG = BrazeLogger.getBrazeLogTag(BrazeGtmTagProvider::class.java!!)
private val TAG = BrazeLogger.getBrazeLogTag(BrazeGtmTagProvider::class.java)
private val ACTION_TYPE_KEY = "actionType"

// Custom Events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,21 @@ Even when automatic tracking is disabled, you can manually log single location d
{% tab JAVA %}

```java
Braze.getInstance(context).getCurrentUser().setLastKnownLocation(LATITUDE_DOUBLE_VALUE, LONGITUDE_DOUBLE_VALUE, ALTITUDE_DOUBLE_VALUE, ACCURACY_DOUBLE_VALUE);
Braze.getInstance(context).getCurrentUser(new IValueCallback<BrazeUser>() {
@Override
public void onSuccess(BrazeUser brazeUser) {
brazeUser.setLastKnownLocation(LATITUDE_DOUBLE_VALUE, LONGITUDE_DOUBLE_VALUE, ALTITUDE_DOUBLE_VALUE, ACCURACY_DOUBLE_VALUE);
}
}
```

{% endtab %}
{% tab KOTLIN %}

```kotlin
Braze.getInstance(context).currentUser?.setLastKnownLocation(LATITUDE_DOUBLE_VALUE, LONGITUDE_DOUBLE_VALUE, ALTITUDE_DOUBLE_VALUE, ACCURACY_DOUBLE_VALUE)
Braze.getInstance(context).getCurrentUser { brazeUser ->
brazeUser.setLastKnownLocation(LATITUDE_DOUBLE_VALUE, LONGITUDE_DOUBLE_VALUE, ALTITUDE_DOUBLE_VALUE, ACCURACY_DOUBLE_VALUE)
}
```

{% endtab %}
Expand Down
Loading

0 comments on commit 4292ce3

Please sign in to comment.