Skip to content

Commit

Permalink
Fix deeplink edge case (#74)
Browse files Browse the repository at this point in the history
* fix: url decoding

decode parameter value instead of decoding the complete url

* update: Constants.kt

---------

Co-authored-by: Hemant Mann <[email protected]>
  • Loading branch information
IloveJavaa and Hemant-Mann authored Apr 29, 2024
1 parent 892e11b commit a98c3d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions TrackierSDK/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ POM_DEVELOPER_ID=trackier
POM_DEVELOPER_NAME=Trackier
PUBLISH_DEVELOPER_EMAIL=[email protected]
POM_LICENCE_DIST=repo
VERSION_CODE=46
VERSION_NAME=1.6.56
VERSION_CODE=47
VERSION_NAME=1.6.57
GROUP=com.trackier
POM_SCM_DEV_CONNECTION=scm\:[email protected]\:trackier/android_sdk.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.trackier.sdk


object Constants {
const val SDK_VERSION = "1.6.56"
const val SDK_VERSION = "1.6.57"
const val USER_AGENT = "com.cloudstuff.trackiersdk:trackier-android:" + SDK_VERSION
const val API_VERSION = "v1"
const val BASE_URL = "https://events.trackier.io/" + API_VERSION + "/"
Expand Down
5 changes: 3 additions & 2 deletions TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/Util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ object Util {

fun getQueryParams(uri: String): Map<String, String> {
val map = mutableMapOf<String, String>()
val decodedUrl = URLDecoder.decode(uri, "UTF-8").toString()
val decodedUrl = uri
// val decodedUrl = URLDecoder.decode(uri, "UTF-8").toString()
try {
val urlParts = decodedUrl.split("?")
var query = decodedUrl
Expand All @@ -91,7 +92,7 @@ object Util {
val parts = modifiedParam[0].split("=")
if (parts.size == 2) {
val name = parts[0]
val value = parts[1]
val value = URLDecoder.decode(parts[1], "UTF-8").toString()
map[name] = value
}
}
Expand Down

0 comments on commit a98c3d0

Please sign in to comment.