Skip to content

Commit

Permalink
Merge pull request #4 from BranchMetrics/master
Browse files Browse the repository at this point in the history
update form base
  • Loading branch information
antonargunov authored Feb 7, 2020
2 parents b87e6b7 + bc41469 commit 4442c7e
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 36 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ BranchUnityTestBed/Obj
BranchUnityTestBed/Build?
UnityConnectSettings.asset
ClusterInputManager.asset
Logs/

# Android Studio
.idea
*.iml
build/

# Mac stuff
*.DS_Store
2 changes: 1 addition & 1 deletion AndroidWrapperProject/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {

dependencies {
// compile 'com.android.support:multidex:1.0.3'
compile 'io.branch.sdk.android:library:4.2.1'
compile 'io.branch.sdk.android:library:4.3.2'
// Comment out the line above, uncomment the line below to use local Branch and update the settings.gradle file as well.
// compile project(':Branch-SDK')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import android.os.Bundle;
import android.content.Intent;

import io.branch.referral.Defines;

/**
* Created by antonarhunou on 10/13/16.
*/
Expand All @@ -16,6 +18,8 @@ public void onCreate(Bundle savedInstanceState) {

@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
intent.putExtra(Defines.Jsonkey.ForceNewBranchSession.getKey(), true);
this.setIntent(intent);

BranchUnityWrapper.initSessionWithIntent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Application;
import io.branch.referral.Branch;
import android.bluetooth.BluetoothSocket;
import io.branch.referral.BranchUtil;
//import android.support.multidex.MultiDexApplication;

/**
Expand All @@ -13,7 +14,8 @@ public class BranchUnityApp extends Application {
//public class BranchUnityApp extends MultiDexApplication {
public void onCreate() {
super.onCreate();

BranchUtil.setPluginType(BranchUtil.PluginType.Unity);
BranchUtil.setPluginVersion("0.6.0");
Branch.getAutoInstance(this.getApplicationContext());
Branch.disableInstantDeepLinking(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public static void setBranchKey(String branchKey) {

public static void getAutoInstance() {
Activity unityActivity = UnityPlayer.currentActivity;
BranchUtil.setPluginType(BranchUtil.PluginType.Unity);
BranchUtil.setPluginVersion("0.6.0");
Branch.getAutoInstance(unityActivity.getApplicationContext());
}

Expand All @@ -70,8 +72,7 @@ public static void initSession(String callbackId) {
autoInitCallbackWithParams = callbackId;

Activity unityActivity = UnityPlayer.currentActivity;
// Branch.getInstance(UnityPlayer.currentActivity.getApplicationContext(), _branchKey).initSession(new BranchReferralInitListenerUnityCallback(callbackId), unityActivity.getIntent().getData(), unityActivity);
Branch.getInstance(UnityPlayer.currentActivity.getApplicationContext(), _branchKey).reInitSession(unityActivity, new BranchReferralInitListenerUnityCallback(callbackId));
Branch.getInstance(UnityPlayer.currentActivity.getApplicationContext(), _branchKey).initSession(new BranchReferralInitListenerUnityCallback(callbackId), unityActivity.getIntent().getData(), unityActivity);
}

public static void initSession(String callbackId, boolean isReferrable) {
Expand All @@ -83,8 +84,7 @@ public static void initSessionWithUniversalObjectCallback(String callbackId) {
autoInitCallbackWithBUO = callbackId;

Activity unityActivity = UnityPlayer.currentActivity;
// Branch.getInstance(UnityPlayer.currentActivity.getApplicationContext(), _branchKey).initSession(new BranchUniversalReferralInitListenerUnityCallback(callbackId), unityActivity.getIntent().getData(), unityActivity);
Branch.getInstance(UnityPlayer.currentActivity.getApplicationContext(), _branchKey).reInitSession(unityActivity, new BranchUniversalReferralInitListenerUnityCallback(callbackId));
Branch.getInstance(UnityPlayer.currentActivity.getApplicationContext(), _branchKey).initSession(new BranchUniversalReferralInitListenerUnityCallback(callbackId), unityActivity.getIntent().getData(), unityActivity);
}

public static void initSessionWithIntent() {
Expand Down
2 changes: 1 addition & 1 deletion BranchUnityTestBed/Assets/Branch/Branch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class Branch : MonoBehaviour {

public static string sdkVersion = "0.5.15";
public static string sdkVersion = "0.6.0";

public delegate void BranchCallbackWithParams(Dictionary<string, object> parameters, string error);
public delegate void BranchCallbackWithUrl(string url, string error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>

<!-- Add this for Branch for install referrer tracking-->
<receiver android:name="io.branch.referral.InstallListener" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

<!-- Optional. Set to true to disable auto deep link feature-->
<meta-data android:name="io.branch.sdk.auto_link_disable" android:value="false"/>

Expand Down
Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.
Binary file modified BranchUnityWrapper.unitypackage
Binary file not shown.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Branch Unity SDK change log

- 0.6.0
* Updating Branch to Android version 4.3.2
* Fix missing refrring params

- 0.5.15
* Updating Branch to Android version 4.2.1 and iOS version 0.31.3

Expand Down

0 comments on commit 4442c7e

Please sign in to comment.