【adjust】游戏中已经提现了多次,adjust 中没有接收到事件上报
This commit is contained in:
parent
e2371468b5
commit
2b3b5f905f
|
|
@ -50,6 +50,8 @@ class AdjustManager private constructor() {
|
|||
}
|
||||
|
||||
|
||||
private var mGaid: String = ""
|
||||
private var mAdid: String = ""
|
||||
private var mAttribution: AdjustAttribution? = null
|
||||
private var initStartTime: Long = 0
|
||||
|
||||
|
|
@ -133,9 +135,13 @@ class AdjustManager private constructor() {
|
|||
Adjust.enable()
|
||||
|
||||
Adjust.getGoogleAdId(BaseApp.appContext(), OnGoogleAdIdReadListener { gaId->
|
||||
|
||||
mGaid = gaId
|
||||
})
|
||||
|
||||
Adjust.getAdid { adId->
|
||||
mAdid = adId
|
||||
}
|
||||
|
||||
if (!mSpHelper.hasIdentityUserType()) {
|
||||
mChecker.startPolling()
|
||||
} else {
|
||||
|
|
@ -273,6 +279,14 @@ class AdjustManager private constructor() {
|
|||
return mAttribution?.network ?: ""
|
||||
}
|
||||
|
||||
fun getGaId(): String {
|
||||
return mGaid
|
||||
}
|
||||
|
||||
fun getAaId(): String {
|
||||
return mAdid
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package com.gamedog.statisticreporter.firbase
|
||||
|
||||
|
||||
import android.R.string
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import cn.thinkingdata.analytics.TDAnalytics
|
||||
import com.ama.core.architecture.BaseApp
|
||||
import com.ama.core.architecture.util.AndroidUtil.Companion.gson
|
||||
import com.gamedog.statisticreporter.StatisticLogger
|
||||
|
|
@ -99,6 +101,16 @@ class FireBaseManager private constructor() {
|
|||
}
|
||||
|
||||
|
||||
fun getSSSuperProperties(): String{
|
||||
val superPros = TDAnalytics.getSuperProperties()
|
||||
return superPros.toString()
|
||||
}
|
||||
|
||||
fun getDistinctId(): String{
|
||||
return TDAnalytics.getDistinctId()
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 记录推荐事件(使用 Firebase 预设事件类型)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.gamedog.vididin.manager
|
||||
|
||||
import android.provider.Settings
|
||||
import com.ama.core.architecture.BaseApp
|
||||
import com.ama.core.architecture.util.AndroidUtil
|
||||
import com.ama.core.architecture.util.DateUtil
|
||||
import com.ama.core.architecture.util.DeviceUtil
|
||||
|
|
@ -8,7 +10,9 @@ import com.ama.core.architecture.util.NetUtil
|
|||
import com.ama.core.architecture.util.SpUtil
|
||||
import com.ama.core.architecture.util.eventbus.NotifyMan
|
||||
import com.gamedog.statisticreporter.StatisticUtil
|
||||
import com.gamedog.statisticreporter.adjust.AdjustManager
|
||||
import com.gamedog.statisticreporter.adjust.SpHelper.Companion.KEY_USER_FROM_TYPE
|
||||
import com.gamedog.statisticreporter.firbase.FireBaseManager
|
||||
import com.gamedog.vididin.VidiConst
|
||||
import com.gamedog.vididin.VididinEvents
|
||||
import com.gamedog.vididin.beans.RECORD_CASH_WITHDRAW
|
||||
|
|
@ -601,32 +605,41 @@ class WithdrawManager private constructor() {
|
|||
account_type = accountType
|
||||
document_type = accountType
|
||||
document_id = bankAccount
|
||||
name = "CapyBucks"
|
||||
name = AndroidUtil.getPackageId()
|
||||
clientName = AndroidUtil.getPackageId()
|
||||
|
||||
|
||||
dataAdjust.gps_adid = "gaid"
|
||||
dataAdjust.android_id = "androidid"
|
||||
dataAdjust.adid = "adid"
|
||||
dataAdjust.user_agent = "GetUerAgent"
|
||||
dataAdjust.price = amount
|
||||
val gaid = AdjustManager.instance().getGaId()
|
||||
val adid = AdjustManager.instance().getAaId()
|
||||
val agent = getUserAgent()
|
||||
val androidId = getAndroidId()
|
||||
val price = "Payout_price"
|
||||
dataAdjust.gps_adid = gaid
|
||||
dataAdjust.android_id = androidId
|
||||
dataAdjust.adid = adid
|
||||
dataAdjust.user_agent = agent
|
||||
dataAdjust.price = price
|
||||
dataAdjust.currency = "USD"
|
||||
|
||||
dataShuShu.gps_gaid = "gaid"
|
||||
dataShuShu.android_id = "androidid"
|
||||
dataShuShu.adid = "adid"
|
||||
dataShuShu.user_agent = "GetUerAgent"
|
||||
dataShuShu.price = amount
|
||||
|
||||
val superPros = FireBaseManager.instance().getSSSuperProperties()
|
||||
val distinctId = FireBaseManager.instance().getDistinctId()
|
||||
val gameMoney = (withdrawRecord.amountNum * 1000).toString()
|
||||
dataShuShu.gps_gaid = gaid
|
||||
dataShuShu.android_id = androidId
|
||||
dataShuShu.adid = adid
|
||||
dataShuShu.user_agent = agent
|
||||
dataShuShu.price = price
|
||||
dataShuShu.currency = "USD"
|
||||
dataShuShu.payment_method = "Pix"
|
||||
dataShuShu.payment_type = accountType
|
||||
dataShuShu.payment_number = account
|
||||
dataShuShu.iap_name = "100br"
|
||||
dataShuShu.gamecoin_number = "100"
|
||||
dataShuShu.iap_name = gameMoney + "br"
|
||||
dataShuShu.gamecoin_number = gameMoney
|
||||
dataShuShu.gamecoin_type = "gold"
|
||||
dataShuShu.ss_account_id = "GetSSAccountId"
|
||||
dataShuShu.ss_distinct_id = "GetSSDistinctId"
|
||||
dataShuShu.ss_super_properties = "GetSSSuper Properties"
|
||||
dataShuShu.ss_account_id = ""
|
||||
dataShuShu.ss_distinct_id = distinctId
|
||||
dataShuShu.ss_super_properties = superPros
|
||||
}
|
||||
|
||||
val payoutReqResult = NetworkUtil.callApi {
|
||||
|
|
@ -745,6 +758,35 @@ class WithdrawManager private constructor() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取 Android ID
|
||||
* 结果可能为 null(极少数情况)或空字符串,调用方需自行处理。
|
||||
*/
|
||||
fun getAndroidId(): String {
|
||||
val context = BaseApp.appContext()
|
||||
return try {
|
||||
Settings.Secure.getString(
|
||||
context.contentResolver,
|
||||
Settings.Secure.ANDROID_ID
|
||||
) ?: "unknown"
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
"unknown"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun getUserAgent(): String? {
|
||||
return try {
|
||||
System.getProperty("http.agent")
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue