TP-59291 cash loan app installation failure (#10099)
Co-authored-by: Aman <amankasyapp@gmail.com>
This commit is contained in:
@@ -24,6 +24,7 @@ import com.navi.base.utils.isNull
|
||||
import com.navi.base.utils.orFalse
|
||||
import com.navi.base.utils.orZero
|
||||
import com.navi.common.model.ModuleNameV2
|
||||
import com.navi.common.network.models.ErrorMessage
|
||||
import com.navi.common.utils.CommonNaviAnalytics
|
||||
import com.navi.common.utils.deviceId
|
||||
import com.navi.common.utils.fetchInstallerName
|
||||
@@ -5825,6 +5826,17 @@ class NaviAnalytics private constructor() {
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
fun subModuleDownloadFailed(moduleName: String, errorMessage: String) {
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
eventName = "${moduleName}_MODULE_INSTALLATION_FAILED",
|
||||
eventValues =
|
||||
attributeMapWithScreenName(
|
||||
screenName.orEmpty(),
|
||||
mapOf(Pair("errorMessage", errorMessage))
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -376,6 +376,12 @@ class DynamicDeliveryActivity : BaseActivity() {
|
||||
)
|
||||
}
|
||||
}
|
||||
is ModuleStatus.Failed -> {
|
||||
dynamicDeliveryEventTracker.subModuleDownloadFailed(
|
||||
moduleName = modulePrefixForEventName,
|
||||
errorMessage = it.errorMessage
|
||||
)
|
||||
}
|
||||
else -> Unit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,11 +103,11 @@ class DynamicDeliveryVM(private val manager: SplitInstallManager) : BaseVM() {
|
||||
try {
|
||||
val request = SplitInstallRequest.newBuilder().addModule(moduleName).build()
|
||||
manager.startInstall(request).addOnFailureListener {
|
||||
_dynamicDeliveryLiveData.value = Failed
|
||||
_dynamicDeliveryLiveData.value = Failed(errorMessage = it.message.orEmpty())
|
||||
}
|
||||
getDynamicModuleStatus(moduleName = moduleName, activityClassPath = activityClassPath)
|
||||
} catch (e: Exception) {
|
||||
_dynamicDeliveryLiveData.value = Failed
|
||||
_dynamicDeliveryLiveData.value = Failed(errorMessage = e.message.orEmpty())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ class DynamicDeliveryVM(private val manager: SplitInstallManager) : BaseVM() {
|
||||
INSTALLING -> Installing
|
||||
INSTALLED ->
|
||||
Installed(moduleName = moduleName, activityClassPath = activityClassPath)
|
||||
FAILED -> Failed
|
||||
FAILED -> Failed(errorMessage = it.errorCode().toString())
|
||||
else -> Unavailable
|
||||
}
|
||||
}
|
||||
@@ -216,7 +216,7 @@ sealed class ModuleStatus {
|
||||
|
||||
data class Installed(val moduleName: String, val activityClassPath: String) : ModuleStatus()
|
||||
|
||||
object Failed : ModuleStatus()
|
||||
data class Failed(val errorMessage: String) : ModuleStatus()
|
||||
|
||||
object Unavailable : ModuleStatus()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user