Skip to content

Commit 31a7c44

Browse files
authored
Merge pull request #141 from BranchMetrics/SDK-1151-GAID-issue
Prep Branch Xamarin 8.0.0 release
2 parents dfa0415 + 86b5935 commit 31a7c44

File tree

21 files changed

+16358
-7360
lines changed

21 files changed

+16358
-7360
lines changed

Branch-Xamarin-Lib.Droid/Branch-Xamarin-Lib.Droid.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<TransformFile Include="Transforms\EnumMethods.xml" />
5757
</ItemGroup>
5858
<ItemGroup>
59-
<EmbeddedJar Include="Jars\Branch-4.3.2_core.jar" />
59+
<EmbeddedJar Include="Jars\Branch-5.1.3.jar" />
6060
</ItemGroup>
6161
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
6262
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
-320 KB
Binary file not shown.
317 KB
Binary file not shown.

Branch-Xamarin-Lib.Droid/Transforms/Metadata.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<attr path="/api/package[@name='io.branch.referral']/class[@name='Branch']" name="managedName">AndroidNativeBranch</attr>
99
<attr path="/api/package[@name='io.branch.referral']/class[@name='GAdsPrefetchTask']/method[@name='doInBackground' and count(parameter)=1 and parameter[1][@type='java.lang.Void...']]/parameter[1]" name="managedType">Java.Lang.Object[]</attr>
1010
<attr path="/api/package[@name='io.branch.referral']/class[@name='GAdsPrefetchTask']/method[@name='doInBackground' and count(parameter)=1 and parameter[1][@type='java.lang.Void...']]" name="managedReturn">Java.Lang.Object</attr>
11-
12-
11+
<attr path="/api/package[@name='io.branch.referral']/class[@name='HuaweiOAIDFetchTask']/method[@name='doInBackground' and count(parameter)=1 and parameter[1][@type='java.lang.Void...']]/parameter[1]" name="managedType">Java.Lang.Object[]</attr>
12+
<attr path="/api/package[@name='io.branch.referral']/class[@name='HuaweiOAIDFetchTask']/method[@name='doInBackground' and count(parameter)=1 and parameter[1][@type='java.lang.Void...']]" name="managedReturn">Java.Lang.Object</attr>
1313
</metadata>

Branch-Xamarin-Lib.iOS/Branch.a

-462 KB
Binary file not shown.

Branch-Xamarin-SDK.Droid/Branch-Xamarin-SDK.Droid.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@
6666
<PackageReference Include="Newtonsoft.Json">
6767
<Version>13.0.1</Version>
6868
</PackageReference>
69+
<PackageReference Include="Xamarin.Android.Binding.InstallReferrer">
70+
<Version>2.2.0</Version>
71+
</PackageReference>
72+
<PackageReference Include="Xamarin.GooglePlayServices.Ads.Identifier">
73+
<Version>116.0.0</Version>
74+
</PackageReference>
6975
</ItemGroup>
7076
<ItemGroup>
7177
<AndroidResource Include="Resources\values\strings.xml" />

Branch-Xamarin-SDK.Droid/BranchAndroid.cs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public class BranchAndroid : Branch
1616

1717
private static BranchAndroid instance = null;
1818

19+
// TODO: can we pull the plugin version automatically?
20+
private static String pluginName = "Xamarin";
21+
private static String pluginVersion = "8.0.0";
22+
1923
private BranchAndroid () { }
2024

2125
public static BranchAndroid getInstance() {
@@ -46,20 +50,17 @@ private AndroidNativeBranch NativeBranch {
4650
public Activity CurrActivity { get; set; }
4751

4852
public static void GetAutoInstance(Context appContext) {
49-
BranchUtil.SetPluginType(BranchUtil.PluginType.Xamarin);
50-
BranchUtil.PluginVersion = "7.1.2";
5153

54+
AndroidNativeBranch.RegisterPlugin(pluginName, pluginVersion);
5255
AndroidNativeBranch.GetAutoInstance(appContext);
5356
AndroidNativeBranch.DisableInstantDeepLinking(true);
5457
}
5558

5659
public static void Init(Context context, String branchKey, IBranchSessionInterface callback) {
57-
5860
Init (((Activity)context).Application, branchKey, callback);
5961
}
6062

6163
public static void Init(Context context, String branchKey, IBranchBUOSessionInterface callback) {
62-
6364
Init (((Activity)context).Application, branchKey, callback);
6465
}
6566

@@ -78,9 +79,10 @@ public static void Init(Application app, String branchKey, IBranchSessionInterfa
7879
instance.appContext = app.ApplicationContext;
7980
instance.branchKey = branchKey;
8081

81-
82-
if (Debug) {
83-
instance.SetDebug ();
82+
AndroidNativeBranch.RegisterPlugin(pluginName, pluginVersion);
83+
if (EnableLogging)
84+
{
85+
AndroidNativeBranch.EnableLogging();
8486
}
8587

8688
instance.lifeCycleHandler = new BranchAndroidLifeCycleHandler(callback);
@@ -101,30 +103,26 @@ public static void Init(Application app, String branchKey, IBranchBUOSessionInte
101103
}
102104

103105
instance = new BranchAndroid ();
106+
104107
Branch.branchInstance = instance;
105108
instance.appContext = app.ApplicationContext;
106109
instance.branchKey = branchKey;
107110

108-
if (Debug) {
109-
instance.SetDebug ();
111+
AndroidNativeBranch.RegisterPlugin(pluginName, pluginVersion);
112+
if (EnableLogging)
113+
{
114+
AndroidNativeBranch.EnableLogging();
110115
}
111116

112-
instance.lifeCycleHandler = new BranchAndroidLifeCycleHandler(callback);
117+
instance.lifeCycleHandler = new BranchAndroidLifeCycleHandler(callback);
113118
app.RegisterActivityLifecycleCallbacks(instance.lifeCycleHandler);
114119

115120
// we call IniSession in BranchAndroidLifeCycleHandler.OnActivityStarted
116121
//getInstance().InitSession(callback);
117122
}
118123

119-
120-
protected override void SetDebug() {
121-
AndroidNativeBranch.EnableDebugMode();
122-
//NativeBranch.SetDebug ();
123-
}
124-
125124
#endregion
126125

127-
128126
#region Session methods
129127

130128
public override void InitSession(IBranchSessionInterface callback) {

0 commit comments

Comments
 (0)