Skip to content

Commit 963edef

Browse files
authored
Merge pull request #543 from sequoiaat/Issue538
Added function handlers in execute and run for setCookieBasedMatching
2 parents f94449a + 1981e26 commit 963edef

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

examples/cordova1/platforms/android/app/src/main/java/io/branch/BranchSDK.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
116116
} else if (action.equals("disableTracking")) {
117117
cordova.getActivity().runOnUiThread(r);
118118
return true;
119-
} else if (action.equals("initSession")) {
119+
} else if (action.equals("setCookieBasedMatching")) {
120+
cordova.getActivity().runOnUiThread(r);
121+
return true;
122+
} else if (action.equals("initSession")) {
120123
cordova.getActivity().runOnUiThread(r);
121124
return true;
122125
} else if (action.equals("setRequestMetadata")) {
@@ -1317,7 +1320,9 @@ public void run() {
13171320
try {
13181321
if (this.action.equals("setDebug")) {
13191322
setDebug(this.args.getBoolean(0), this.callbackContext);
1320-
} else if (this.action.equals("disableTracking")) {
1323+
} else if (this.action.equals("setCookieBasedMatching")) {
1324+
setCookieBasedMatching(this.args.getString(0), this.callbackContext);
1325+
} else if (this.action.equals("disableTracking")) {
13211326
disableTracking(this.args.getBoolean(0), this.callbackContext);
13221327
} else if (this.action.equals("initSession")) {
13231328
initSession(this.callbackContext);

examples/cordova1/plugins/branch-cordova-sdk/src/android/io/branch/BranchSDK.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
116116
} else if (action.equals("disableTracking")) {
117117
cordova.getActivity().runOnUiThread(r);
118118
return true;
119-
} else if (action.equals("initSession")) {
119+
} else if (action.equals("setCookieBasedMatching")) {
120+
cordova.getActivity().runOnUiThread(r);
121+
return true;
122+
} else if (action.equals("initSession")) {
120123
cordova.getActivity().runOnUiThread(r);
121124
return true;
122125
} else if (action.equals("setRequestMetadata")) {
@@ -1317,7 +1320,9 @@ public void run() {
13171320
try {
13181321
if (this.action.equals("setDebug")) {
13191322
setDebug(this.args.getBoolean(0), this.callbackContext);
1320-
} else if (this.action.equals("disableTracking")) {
1323+
} else if (this.action.equals("setCookieBasedMatching")) {
1324+
setCookieBasedMatching(this.args.getString(0), this.callbackContext);
1325+
} else if (this.action.equals("disableTracking")) {
13211326
disableTracking(this.args.getBoolean(0), this.callbackContext);
13221327
} else if (this.action.equals("initSession")) {
13231328
initSession(this.callbackContext);

src/android/io/branch/BranchSDK.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
113113
if (action.equals("setDebug")) {
114114
cordova.getActivity().runOnUiThread(r);
115115
return true;
116-
} else if (action.equals("disableTracking")) {
116+
} else if (action.equals("setCookieBasedMatching")) {
117+
cordova.getActivity().runOnUiThread(r);
118+
return true;
119+
} else if (action.equals("disableTracking")) {
117120
cordova.getActivity().runOnUiThread(r);
118121
return true;
119122
} else if (action.equals("initSession")) {
@@ -1317,6 +1320,8 @@ public void run() {
13171320
try {
13181321
if (this.action.equals("setDebug")) {
13191322
setDebug(this.args.getBoolean(0), this.callbackContext);
1323+
} else if (this.action.equals("setCookieBasedMatching")) {
1324+
setCookieBasedMatching(this.args.getString(0), this.callbackContext);
13201325
} else if (this.action.equals("disableTracking")) {
13211326
disableTracking(this.args.getBoolean(0), this.callbackContext);
13221327
} else if (this.action.equals("initSession")) {

0 commit comments

Comments
 (0)