NTP-69500 | Sohan | Handling for Appsflyer source in NUX for ZEPTO integration (#16443)
This commit is contained in:
committed by
GitHub
parent
9603dcf260
commit
4b3b148eaf
@@ -12,6 +12,7 @@ import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import com.navi.analytics.utils.NaviTrackEvent
|
||||
import com.navi.base.model.CtaData
|
||||
import com.navi.base.sharedpref.PreferenceManager
|
||||
import com.navi.base.utils.BaseUtils
|
||||
import com.navi.base.utils.isNotNull
|
||||
import com.navi.base.utils.isNotNullAndNotEmpty
|
||||
@@ -65,6 +66,7 @@ class DeeplinkManager(
|
||||
private const val CUSTOM_OBJECT = "custom_object"
|
||||
private const val IDENTIFIER = "identifier"
|
||||
private const val DEEP_LINK_SUB1 = "deep_link_sub1"
|
||||
private const val DEEP_LINK_SUB2 = "deep_link_sub2"
|
||||
private const val IS_ADDITIONAL_DATA_NEEDED = "isAdditionalDataNeeded"
|
||||
private const val META_DATA = "metadata"
|
||||
|
||||
@@ -73,6 +75,7 @@ class DeeplinkManager(
|
||||
const val DEEPLINK_TYPE = "deeplinkType"
|
||||
const val DEEPLINK_MANAGER = "DeeplinkManager"
|
||||
const val NAVILINK_IDENTIFIER = "naviLinkIdentifier"
|
||||
const val APPSFLYER_SOURCE_IDENTIFIER = "appsFlyerSourceIdentifier"
|
||||
}
|
||||
|
||||
fun handleDeeplinkData(
|
||||
@@ -99,6 +102,12 @@ class DeeplinkManager(
|
||||
)
|
||||
return
|
||||
}
|
||||
if (jsonObject?.optString(DEEP_LINK_SUB2).isNullOrEmpty().not()) {
|
||||
PreferenceManager.setStringPreference(
|
||||
APPSFLYER_SOURCE_IDENTIFIER,
|
||||
jsonObject?.optString(DEEP_LINK_SUB2).orEmpty(),
|
||||
)
|
||||
}
|
||||
val url = jsonObject?.optString(URL)?.replace("-", "/").orEmpty()
|
||||
val source = jsonObject?.optString(Constants.LOGIN_SOURCE)
|
||||
val additionalDataRequired = jsonObject?.optBoolean(ADDITIONAL_DATA_NEEDED)
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.navi.common.utils.log
|
||||
import com.navi.uitron.model.data.UiTronActionData
|
||||
import com.navi.uitron.model.data.UiTronActionType
|
||||
import com.naviapp.BuildConfig
|
||||
import com.naviapp.analytics.deeplink.DeeplinkManager.Companion.APPSFLYER_SOURCE_IDENTIFIER
|
||||
import com.naviapp.common.navigator.NaviDeepLinkNavigator.HOME
|
||||
import com.naviapp.common.navigator.NaviDeepLinkNavigator.REGISTRATION
|
||||
import com.naviapp.network.di.DataDeserializers
|
||||
@@ -112,12 +113,15 @@ constructor(
|
||||
screenId: String,
|
||||
naeScreenName: String,
|
||||
): NaviCacheAltSourceEntity {
|
||||
val inputMap =
|
||||
mutableMapOf(SOURCE to queryMap[SOURCE]).apply {
|
||||
PreferenceManager.getStringPreference(APPSFLYER_SOURCE_IDENTIFIER)?.let {
|
||||
this[APPSFLYER_SOURCE_IDENTIFIER] = it
|
||||
}
|
||||
}
|
||||
val response =
|
||||
nuxRepository.fetchNuxScreenResponse(
|
||||
AlchemistScreenRequest(
|
||||
screenName = screenId,
|
||||
inputMap = mapOf(SOURCE to queryMap[SOURCE]),
|
||||
),
|
||||
AlchemistScreenRequest(screenName = screenId, inputMap = inputMap),
|
||||
naeScreenName = naeScreenName,
|
||||
)
|
||||
if (response.isValidResponse()) {
|
||||
|
||||
Reference in New Issue
Block a user