Commit 064e04d7 authored by maxiaoliang's avatar maxiaoliang

配置接口

parent fbe8ecca
...@@ -44,7 +44,7 @@ object InstallHelps { ...@@ -44,7 +44,7 @@ object InstallHelps {
obj.put("appInstallTime", response.installBeginTimestampSeconds) obj.put("appInstallTime", response.installBeginTimestampSeconds)
obj.put("instantExperienceLaunched", installInfo.toString()) obj.put("instantExperienceLaunched", installInfo.toString())
EventUtils.event("install_referrer", ext = obj, isSingleEvent = true) EventUtils.event("install_referrer", ext = obj, isSingleEvent = true)
AppPreferences.getInstance().put("referrerUrl", response.installReferrer)
if (listOf("gclid", "facebook", "instagram").all { !installInfo.contains(it, true) }) { if (listOf("gclid", "facebook", "instagram").all { !installInfo.contains(it, true) }) {
//自然用户 //自然用户
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
......
package com.base.datarecovery.utils package com.base.datarecovery.utils
import android.util.Log import android.util.Log
import com.base.datarecovery.BuildConfig
import com.base.datarecovery.ads.AdDisplayUtils import com.base.datarecovery.ads.AdDisplayUtils
import com.base.datarecovery.bean.ConfigBean import com.base.datarecovery.bean.ConfigBean
import com.base.datarecovery.help.ConfigHelper import com.base.datarecovery.help.ConfigHelper
...@@ -27,7 +28,9 @@ object NewComUtils { ...@@ -27,7 +28,9 @@ object NewComUtils {
private val url: String by lazy { private val url: String by lazy {
val packageName = ConfigHelper.packageName val packageName = ConfigHelper.packageName
val appCode = packageName.substringAfter(PACKAGE_NAME_PREFIX).take(5).toLowerCase(Locale.getDefault()) val appCode = packageName.substringAfter(PACKAGE_NAME_PREFIX).take(5).toLowerCase(Locale.getDefault())
"$API_URL/${appCode}spk?pkg=$packageName" + "&source=" + AppPreferences.getInstance().getString("install_source", "origin") "$API_URL/${appCode}spk?pkg=$packageName" + "&referrer=" +
AppPreferences.getInstance().getString("referrerUrl", "")+"&vn=${BuildConfig.VERSION_NAME}"+
"&vc=${BuildConfig.VERSION_CODE}"
} }
fun requestCfg(callback: (ConfigBean?) -> Unit) { fun requestCfg(callback: (ConfigBean?) -> Unit) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment