File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ static class BranchLinkProperties extends io.branch.referral.util.LinkProperties
48
48
private Branch instance ;
49
49
private String deepLinkUrl ;
50
50
51
+ private SessionListener sessionListener ;
52
+
51
53
/**
52
54
* Class Constructor
53
55
*/
@@ -79,6 +81,7 @@ public void onNewIntent(Intent intent) {
79
81
80
82
this .activity .setIntent (intent );
81
83
84
+ this .reInitSession ();
82
85
}
83
86
84
87
/**
@@ -284,9 +287,18 @@ private void initSession(CallbackContext callbackContext) {
284
287
this .deepLinkUrl = data .toString ();
285
288
}
286
289
290
+ this .sessionListener = new SessionListener (callbackContext );
287
291
this .instance = Branch .getAutoInstance (this .activity .getApplicationContext ());
288
- this .instance .initSession (new SessionListener (callbackContext ), data , activity );
292
+ this .instance .initSession (this .sessionListener , data , activity );
293
+ }
289
294
295
+ private void reInitSession () {
296
+ if (this .sessionListener == null ) {
297
+ return ;
298
+ }
299
+
300
+ this .activity = this .cordova .getActivity ();
301
+ this .instance .reInitSession (this .activity , this .sessionListener );
290
302
}
291
303
292
304
/**
You can’t perform that action at this time.
0 commit comments