Skip to content

Commit

Permalink
Updating Unity plugins for version 5.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hokstuff committed Mar 25, 2024
1 parent 0ba1628 commit a8ffe63
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
16 changes: 8 additions & 8 deletions Assets/Plugins/Appboy/BrazeAndroidPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public AndroidJavaObject BrazeInAppMessageManager {
public AndroidJavaObject InAppMessageUtils {
get {
if (inAppMessageUtils == null) {
inAppMessageUtils = new AndroidJavaClass("com.braze.unity.utils.InAppMessageUtils");
inAppMessageUtils = new AndroidJavaObject("com.braze.unity.utils.InAppMessageUtils");
}
return inAppMessageUtils;
}
Expand Down Expand Up @@ -351,18 +351,18 @@ private void SetInAppMessageListener(BrazeInAppMessageListener listener) {
}

public void LogInAppMessageClicked(string inAppMessageJSONString) {
var inAppMessage = InAppMessageUtils.CallStatic<AndroidJavaObject>("inAppMessageFromString", brazeUnityActivity, inAppMessageJSONString);
InAppMessageUtils.CallStatic("logInAppMessageClick", inAppMessage);
var inAppMessage = InAppMessageUtils.Call<AndroidJavaObject>("inAppMessageFromString", brazeUnityActivity, inAppMessageJSONString);
InAppMessageUtils.Call("logInAppMessageClick", inAppMessage);
}

public void LogInAppMessageImpression(string inAppMessageJSONString) {
var inAppMessage = InAppMessageUtils.CallStatic<AndroidJavaObject>("inAppMessageFromString", brazeUnityActivity, inAppMessageJSONString);
InAppMessageUtils.CallStatic("logInAppMessageImpression", inAppMessage);
var inAppMessage = InAppMessageUtils.Call<AndroidJavaObject>("inAppMessageFromString", brazeUnityActivity, inAppMessageJSONString);
InAppMessageUtils.Call("logInAppMessageImpression", inAppMessage);
}

public void LogInAppMessageButtonClicked(string inAppMessageJSONString, int buttonID) {
var inAppMessage = InAppMessageUtils.CallStatic<AndroidJavaObject>("inAppMessageFromString", brazeUnityActivity, inAppMessageJSONString);
InAppMessageUtils.CallStatic("logInAppMessageButtonClick", inAppMessage, buttonID);
var inAppMessage = InAppMessageUtils.Call<AndroidJavaObject>("inAppMessageFromString", brazeUnityActivity, inAppMessageJSONString);
InAppMessageUtils.Call("logInAppMessageButtonClick", inAppMessage, buttonID);
}

public void RequestFeedRefresh() {
Expand Down Expand Up @@ -397,7 +397,7 @@ public void LogContentCardClicked(string contentCardString) {

public void LogContentCardDismissed(string contentCardString) {
var contentCard = Braze.Call<AndroidJavaObject>("deserializeContentCard", contentCardString);
contentCard.Call("setIsDismissed", true);
contentCard.Call("setDismissed", true);
}

public void RequestContentCardsRefresh() {
Expand Down
5 changes: 5 additions & 0 deletions Assets/Plugins/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 5.2.1

##### Fixed
- Fixed an issue with calling `LogInAppMessageClicked()`, `LogInAppMessageImpression()`, `LogInAppMessageButtonClicked`, and `LogContentCardDismissed(card)` on Android.

## 5.2.0

##### Added
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 5.2.1

##### Fixed
- Fixed an issue with calling `LogInAppMessageClicked()`, `LogInAppMessageImpression()`, `LogInAppMessageButtonClicked`, and `LogContentCardDismissed(card)` on Android.

## 5.2.0

##### Added
Expand Down
8 changes: 4 additions & 4 deletions unity-samples/Assets/Resources/AppboyConfig.asset
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ MonoBehaviour:
iOSInAppMessageGameObjectName: BrazeCallback
iOSInAppMessageCallbackMethodName: InAppMessageReceivedCallback
iOSDisplayInAppMessages: 1
androidInAppMessageListenerGameObjectName: AndroidInAppMessageListenerGameObjectName
androidInAppMessageListenerCallbackMethodName: AndroidInAppMessageListenerCallbackMethodName
androidInAppMessageListenerGameObjectName: BrazeCallback
androidInAppMessageListenerCallbackMethodName: InAppMessageReceivedCallback
androidTriggerActionMinimumTimeSeconds:
androidDisplayInAppMessagesAutomatically: 1
androidSetInAppMessageManagerListenerAutomatically: 1
Expand All @@ -69,8 +69,8 @@ MonoBehaviour:
iOSFeedCallbackMethodName: FeedReceivedCallback
iOSContentCardsGameObjectName: BrazeCallback
iOSContentCardsCallbackMethodName: ContentCardsReceivedCallback
androidContentCardsUpdatedListenerGameObjectName: AndroidContentCardsUpdatedListenerGameObjectName
androidContentCardsUpdatedListenerCallbackMethodName: AndroidContentCardsUpdatedListenerCallbackMethodName
androidContentCardsUpdatedListenerGameObjectName: BrazeCallback
androidContentCardsUpdatedListenerCallbackMethodName: ContentCardsReceivedCallback
androidContentCardsUnreadVisualIndicatorEnabled: 1
featureFlagsGameObjectName: BrazeCallback
featureFlagsCallbackMethodName: FeatureFlagsReceivedCallback
Expand Down
2 changes: 1 addition & 1 deletion unity-samples/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ PlayerSettings:
androidFullscreenMode: 1
defaultIsNativeResolution: 1
macRetinaSupport: 1
runInBackground: 0
runInBackground: 1
captureSingleScreen: 0
muteOtherAudioSources: 1
Prepare IOS For Recording: 0
Expand Down

0 comments on commit a8ffe63

Please sign in to comment.