diff --git a/clevertap-core/src/main/java/com/clevertap/android/sdk/Constants.java b/clevertap-core/src/main/java/com/clevertap/android/sdk/Constants.java index 8e3c29f2d..39478b9ce 100644 --- a/clevertap-core/src/main/java/com/clevertap/android/sdk/Constants.java +++ b/clevertap-core/src/main/java/com/clevertap/android/sdk/Constants.java @@ -446,4 +446,5 @@ public interface Constants { String FLUSH_PUSH_IMPRESSIONS_ONE_TIME_WORKER_NAME = "CTFlushPushImpressionsOneTime"; + String URL_PARAM_DL_SEPARATOR = "__dl__"; } \ No newline at end of file diff --git a/clevertap-core/src/main/java/com/clevertap/android/sdk/inapp/CTInAppBaseFragment.java b/clevertap-core/src/main/java/com/clevertap/android/sdk/inapp/CTInAppBaseFragment.java index d11599b8b..06b9b5bfe 100644 --- a/clevertap-core/src/main/java/com/clevertap/android/sdk/inapp/CTInAppBaseFragment.java +++ b/clevertap-core/src/main/java/com/clevertap/android/sdk/inapp/CTInAppBaseFragment.java @@ -89,13 +89,13 @@ void openActionUrl(String url) { try { final Bundle formData = UriHelper.getAllKeyValuePairs(url, false); - String actionParts = formData.getString(Constants.KEY_C2A); - String callToAction = null; - if (actionParts != null) { - final String[] parts = actionParts.split("__dl__"); + String callToAction = formData.getString(Constants.KEY_C2A); + if (callToAction != null) { + final String[] parts = callToAction.split(Constants.URL_PARAM_DL_SEPARATOR); if (parts.length == 2) { // Decode it here as wzrk_c2a is not decoded by UriHelper callToAction = URLDecoder.decode(parts[0], "UTF-8"); + formData.putString(Constants.KEY_C2A, callToAction); url = parts[1]; } }