Skip to content

Commit

Permalink
Updating Unity plugins for version 3.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
radixdev committed Aug 31, 2022
1 parent 980db83 commit a86c407
Show file tree
Hide file tree
Showing 121 changed files with 43,216 additions and 6 deletions.
Binary file modified Assets/Plugins/Android/appboy-ui.aar
Binary file not shown.
Binary file modified Assets/Plugins/Android/appboy-unity.aar
Binary file not shown.
Binary file modified Assets/Plugins/Android/appboy.aar
Binary file not shown.
12 changes: 6 additions & 6 deletions Assets/Plugins/Appboy/BrazeAndroidPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ public void LogCustomEvent(string eventName, Dictionary<string, object> properti
}

public void LogPurchase(string productId, string currencyCode, decimal price, int quantity) {
var javaPrice = new AndroidJavaObject("java.math.BigDecimal", price.ToString());
var javaPrice = new AndroidJavaObject("java.math.BigDecimal", price.ToString(System.Globalization.CultureInfo.InvariantCulture));
Braze.Call("logPurchase", productId, currencyCode, javaPrice, quantity);
}

public void LogPurchase(string productId, string currencyCode, decimal price, int quantity, Dictionary<string, object> properties) {
var javaPrice = new AndroidJavaObject("java.math.BigDecimal", price.ToString());
var javaPrice = new AndroidJavaObject("java.math.BigDecimal", price.ToString(System.Globalization.CultureInfo.InvariantCulture));
AndroidJavaObject brazeProperties = ParsePropertiesToBrazeProperties(properties);
Braze.Call("logPurchase", productId, currencyCode, javaPrice, quantity, brazeProperties);
}
Expand Down Expand Up @@ -368,10 +368,10 @@ public void RegisterAppboyPushMessages(string registrationId) {
Braze.Call("registerAppboyPushMessages", new object[] { registrationId });
}

/// <summary>
/// No-op on Android.
/// </summary>
public void PromptUserForPushPermissions(bool provisional, PushPromptResponseReceived reponseDelegate = null) {}
public void PromptUserForPushPermissions(bool provisional, PushPromptResponseReceived reponseDelegate = null) {
var brazePermissionUtils = new AndroidJavaClass("com.braze.support.PermissionUtils");
brazePermissionUtils.CallStatic("requestPushPermissionPrompt", BrazeUnityActivity);
}

/// <summary>
/// No-op on Android.
Expand Down
570 changes: 570 additions & 0 deletions Assets/Plugins/CHANGELOG.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Assets/Plugins/CHANGELOG.md.meta

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

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 3.9.0

##### Breaking
- Updated the Android plugin to use Braze Android SDK 23.1.0.
- Added the ability to request push notification permissions on Android 13+ devices via `Appboy.AppboyBinding.PromptUserForPushPermissions(false)`.
- Either `true` or `false` result in the push prompt being shown, on Android. The parameter is unused.

##### Fixed
- Fixed an issue where `AppboyBinding.logPurchase()` calls could fail on Android based on the device locale.

## 3.8.1

##### Added
Expand Down
5 changes: 5 additions & 0 deletions unity-samples/Assets/Editor.meta

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

11 changes: 11 additions & 0 deletions unity-samples/Assets/Editor/BuildAndroid.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using UnityEditor;

class BuildAndroid {
static void PerformBuild () {
string[] scenes = {
"Assets/_Scenes/MiniGame.unity",
"Assets/_Scenes/MainMenu.unity"
};
BuildPipeline.BuildPlayer (scenes, "Roll-A-Ball-Android.apk", BuildTarget.Android, BuildOptions.None);
}
}
8 changes: 8 additions & 0 deletions unity-samples/Assets/Editor/BuildAndroid.cs.meta

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

11 changes: 11 additions & 0 deletions unity-samples/Assets/Editor/BuildIos.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using UnityEditor;

class BuildIos {
static void PerformBuild () {
string[] scenes = {
"Assets/_Scenes/MiniGame.unity",
"Assets/_Scenes/MainMenu.unity"
};
BuildPipeline.BuildPlayer (scenes, "iOS/Roll-A-Ball-Ios", BuildTarget.iOS, BuildOptions.None);
}
}
8 changes: 8 additions & 0 deletions unity-samples/Assets/Editor/BuildIos.cs.meta

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

15 changes: 15 additions & 0 deletions unity-samples/Assets/Editor/SwitchPlatform.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using UnityEngine;
using System.Collections;
using UnityEditor;
using System;

public class AppboySwitchPlatform : MonoBehaviour {

static void SwitchToAndroid () {
EditorUserBuildSettings.SwitchActiveBuildTarget (BuildTargetGroup.Android, BuildTarget.Android);
}

static void SwitchToIos () {
EditorUserBuildSettings.SwitchActiveBuildTarget (BuildTargetGroup.iOS, BuildTarget.iOS);
}
}
8 changes: 8 additions & 0 deletions unity-samples/Assets/Editor/SwitchPlatform.cs.meta

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

36 changes: 36 additions & 0 deletions unity-samples/Assets/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>523313722967-j3g1ha142hgr57dg9qmuk9vp20v4epf4.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.523313722967-j3g1ha142hgr57dg9qmuk9vp20v4epf4</string>
<key>API_KEY</key>
<string>AIzaSyARGytGF2tbv_7breS-qAXTTqdp-39QXbo</string>
<key>GCM_SENDER_ID</key>
<string>523313722967</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.appboy.unity.AppboySample</string>
<key>PROJECT_ID</key>
<string>kitchen-sink-cbc5d</string>
<key>STORAGE_BUCKET</key>
<string>kitchen-sink-cbc5d.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:523313722967:ios:b545b7f459c982976c5512</string>
<key>DATABASE_URL</key>
<string>https://kitchen-sink-cbc5d.firebaseio.com</string>
</dict>
</plist>
7 changes: 7 additions & 0 deletions unity-samples/Assets/GoogleService-Info.plist.meta

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

5 changes: 5 additions & 0 deletions unity-samples/Assets/Plugins.meta

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

5 changes: 5 additions & 0 deletions unity-samples/Assets/Plugins/Android.meta

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

46 changes: 46 additions & 0 deletions unity-samples/Assets/Plugins/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:amazon="http://schemas.amazon.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.appboy.unity.AppboySample"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application android:label="@string/app_name"
android:icon="@drawable/app_icon">
<amazon:enable-feature android:name="com.amazon.device.messaging" android:required="false"/>
<service android:name="com.braze.push.BrazeFirebaseMessagingService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

<activity android:name="com.appboy.unity.AppboyUnityPlayerActivity"
android:exported="true"
android:label="@string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:screenOrientation="sensor">
<meta-data android:name="android.app.lib_name" android:value="unity" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<receiver android:name="com.appboy.unity.AppboyUnityPushBroadcastReceiver" android:exported="false" >
<intent-filter>
<action android:name="com.braze.push.intent.NOTIFICATION_RECEIVED" />
<action android:name="com.braze.push.intent.NOTIFICATION_OPENED" />
<action android:name="com.braze.push.intent.NOTIFICATION_DELETED" />
</intent-filter>
</receiver>
<service android:name="com.google.firebase.messaging.MessageForwardingService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false" >
</service>
</application>
</manifest>
7 changes: 7 additions & 0 deletions unity-samples/Assets/Plugins/Android/AndroidManifest.xml.meta

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

1 change: 1 addition & 0 deletions unity-samples/Assets/Plugins/Android/appboy-ui.aar
35 changes: 35 additions & 0 deletions unity-samples/Assets/Plugins/Android/appboy-ui.aar.meta

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

1 change: 1 addition & 0 deletions unity-samples/Assets/Plugins/Android/appboy-unity.aar
35 changes: 35 additions & 0 deletions unity-samples/Assets/Plugins/Android/appboy-unity.aar.meta

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

1 change: 1 addition & 0 deletions unity-samples/Assets/Plugins/Android/appboy.aar
35 changes: 35 additions & 0 deletions unity-samples/Assets/Plugins/Android/appboy.aar.meta

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
android.enableR8=**MINIFY_WITH_R_EIGHT**
unityStreamingAssets=.unity3d**STREAMING_ASSETS**
**ADDITIONAL_PROPERTIES**
android.useAndroidX=true

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

Loading

0 comments on commit a86c407

Please sign in to comment.