From 6dcb441eca4131e0491ff070a872c6e298ecdbcc Mon Sep 17 00:00:00 2001 From: Renemari Padillo Date: Tue, 13 Dec 2016 13:47:21 +0800 Subject: [PATCH] fix: added $deeplink_path to android --- src/android/io/branch/BranchSDK.java | 40 +++++++++------------------- testbed/www/js/index.js | 1 + 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/android/io/branch/BranchSDK.java b/src/android/io/branch/BranchSDK.java index feee1b74..1130628d 100644 --- a/src/android/io/branch/BranchSDK.java +++ b/src/android/io/branch/BranchSDK.java @@ -350,7 +350,6 @@ private void getFirstReferringParams(CallbackContext callbackContext) { */ private void createBranchUniversalObject(JSONObject options, CallbackContext callbackContext) throws JSONException { - BranchUniversalObject branchObj = new BranchUniversalObject(); // Set object properties @@ -373,7 +372,6 @@ private void createBranchUniversalObject(JSONObject options, CallbackContext cal // Set content visibility if (options.has("contentIndexingMode")) { - if (options.getString("contentIndexingMode").equals("private")) { branchObj.setContentIndexingMode(BranchUniversalObject.CONTENT_INDEX_MODE.PRIVATE); } else { @@ -447,6 +445,7 @@ private BranchLinkProperties createLinkProperties(JSONObject options, JSONObject BranchLinkProperties linkProperties = new BranchLinkProperties(); + // Add link properties if (options.has("feature")) { linkProperties.setFeature(options.getString("feature")); } @@ -465,39 +464,26 @@ private BranchLinkProperties createLinkProperties(JSONObject options, JSONObject if (options.has("duration")) { linkProperties.setDuration(options.getInt("duration")); } - if (options.has("tags")) { JSONArray array = (JSONArray) options.get("tags"); if (array != null) { - for (int i=0;i keys = controlParams.keys(); + + while (keys.hasNext()) { + String key = keys.next().toString(); + + Log.d(LCAT, String.format("key: %s", key)); + + linkProperties.addControlParameter(key, controlParams.getString(key)); } return linkProperties; diff --git a/testbed/www/js/index.js b/testbed/www/js/index.js index 0a7d663f..018996a7 100644 --- a/testbed/www/js/index.js +++ b/testbed/www/js/index.js @@ -184,6 +184,7 @@ function BranchDeepLink() { $ipad_url: "http://www.example.com/ipad", more_custom: "data", even_more_custom: true, + $deeplink_path: "http://deeplink.example.com/testbed", this_is_custom: 41231, this_is_date: Date.now() };