埋点: g广告相关
This commit is contained in:
parent
81ad6111f4
commit
9fec4aeac6
|
|
@ -2,10 +2,13 @@ package com.gamedog.statisticreporter
|
||||||
|
|
||||||
import com.gamedog.statisticreporter.firbase.FireBaseManager
|
import com.gamedog.statisticreporter.firbase.FireBaseManager
|
||||||
import com.gamedog.statisticreporter.shushu.ShushuManager
|
import com.gamedog.statisticreporter.shushu.ShushuManager
|
||||||
|
import com.remax.base.report.DataReportManager
|
||||||
|
import com.remax.base.report.DataReporter
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.SupervisorJob
|
import kotlinx.coroutines.SupervisorJob
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
|
|
||||||
object StatisticUtil {
|
object StatisticUtil {
|
||||||
|
|
||||||
|
|
@ -59,8 +62,33 @@ object StatisticUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
initAdReporter()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun initAdReporter() {
|
||||||
|
DataReportManager.addReporters(object : DataReporter {
|
||||||
|
override fun getName(): String {
|
||||||
|
return "Firebase&Shushu"
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun reportData(
|
||||||
|
eventName: String,
|
||||||
|
data: Map<String, Any>
|
||||||
|
) {
|
||||||
|
StatisticUtil.reportEvents(eventName, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setCommonParams(params: Map<String, Any>) {
|
||||||
|
val aaa = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setUserParams(params: Map<String, Any>) {
|
||||||
|
val aaa = 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,10 @@ object DataReportManager {
|
||||||
this.reporters.addAll(reporters)
|
this.reporters.addAll(reporters)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun addReporters(reporter: DataReporter) {
|
||||||
|
this.reporters.add(reporter)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置公共参数
|
* 设置公共参数
|
||||||
* @param params 公共参数Map
|
* @param params 公共参数Map
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue