Skip to content

Commit feeb330

Browse files
authored
Merge pull request #535 from BranchMetrics/SDK-693-prep-RN-release
SDK-693 Prep RN release
2 parents 168143a + 2d41bf6 commit feeb330

File tree

4 files changed

+14
-255
lines changed

4 files changed

+14
-255
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cache: yarn
1010

1111
install:
1212
# Set up RVM, RubyGems, Bundler
13-
- rvm use 2.6.5 --default
13+
- rvm use 2.6 --default
1414
- gem update --system
1515
- gem install bundler
1616
- bundle check || bundle install

Gemfile.lock

Lines changed: 0 additions & 252 deletions
This file was deleted.

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ android {
3030

3131
dependencies {
3232
implementation 'com.facebook.react:react-native:+' // From node_modules
33-
api 'io.branch.sdk.android:library:4.2.1'
33+
api 'io.branch.sdk.android:library:4.3.2'
3434
}

android/src/main/java/io/branch/rnbranch/RNBranchModule.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ else if (!useTest && liveKey != null) {
114114

115115
public static void reInitSession(Activity reactActivity) {
116116
Branch branch = Branch.getInstance();
117-
branch.reInitSession(reactActivity, referralInitListener);
117+
Intent intent = reactActivity.getIntent();
118+
if (intent != null) {
119+
intent.putExtra("branch_force_new_session", true);
120+
branch.reInitSession(reactActivity, referralInitListener);
121+
} else {
122+
Log.w(REACT_CLASS, "reInitSession was called but the Intent is null");
123+
}
118124
}
119125

120126
public static void initSession(final Uri uri, Activity reactActivity, Branch.BranchUniversalReferralInitListener anInitListener) {
@@ -133,6 +139,11 @@ public static void initSession(final Uri uri, Activity reactActivity) {
133139
@Override
134140
public void onInitFinished(JSONObject referringParams, BranchError error) {
135141

142+
// react native currently expects this to never be null
143+
if (referringParams == null) {
144+
referringParams = new JSONObject();
145+
}
146+
136147
Log.d(REACT_CLASS, "onInitFinished");
137148
JSONObject result = new JSONObject();
138149
Uri referringUri = null;

0 commit comments

Comments
 (0)