From 9fec4aeac62eefbc93331014c587e8fcd0c1beac Mon Sep 17 00:00:00 2001 From: renhaoting <370797079@qq.com> Date: Mon, 5 Jan 2026 18:18:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=8B=E7=82=B9=EF=BC=9A=20g=E5=B9=BF?= =?UTF-8?q?=E5=91=8A=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statisticreporter/StatisticUtil.kt | 28 +++++++++++++++++++ .../com/remax/base/report/DataReporter.kt | 4 +++ 2 files changed, 32 insertions(+) diff --git a/StatisticReporter/src/main/java/com/gamedog/statisticreporter/StatisticUtil.kt b/StatisticReporter/src/main/java/com/gamedog/statisticreporter/StatisticUtil.kt index a0a9b99..1ab2f94 100644 --- a/StatisticReporter/src/main/java/com/gamedog/statisticreporter/StatisticUtil.kt +++ b/StatisticReporter/src/main/java/com/gamedog/statisticreporter/StatisticUtil.kt @@ -2,10 +2,13 @@ package com.gamedog.statisticreporter import com.gamedog.statisticreporter.firbase.FireBaseManager 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.Dispatchers import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.launch +import kotlinx.coroutines.runBlocking 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 + ) { + StatisticUtil.reportEvents(eventName, data) + } + + override fun setCommonParams(params: Map) { + val aaa = 1 + } + + override fun setUserParams(params: Map) { + val aaa = 1 + } + }) + } } diff --git a/base/src/main/java/com/remax/base/report/DataReporter.kt b/base/src/main/java/com/remax/base/report/DataReporter.kt index 1686993..0d34c44 100644 --- a/base/src/main/java/com/remax/base/report/DataReporter.kt +++ b/base/src/main/java/com/remax/base/report/DataReporter.kt @@ -46,6 +46,10 @@ object DataReportManager { this.reporters.clear() this.reporters.addAll(reporters) } + + fun addReporters(reporter: DataReporter) { + this.reporters.add(reporter) + } /** * 设置公共参数