新建helper 类
This commit is contained in:
parent
1a9ea870e5
commit
090e819e84
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.gamedog.vididin
|
||||||
|
|
||||||
|
object VidiStatisticHelper {
|
||||||
|
|
||||||
|
fun getShowFromStr(watchAdType: Int): String {
|
||||||
|
val fromStr = ""
|
||||||
|
when (watchAdType) {
|
||||||
|
VidiConst.WATCH_AD_FOR_DAILY_WATCH_AD -> {
|
||||||
|
return "RV_VideoStream"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_DAILY_EARN_GOLD -> {
|
||||||
|
return "RV_Home_Menu"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_DAILY_WATCH_AD -> {
|
||||||
|
return "RV_Daily_Task"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_DAILY_EARN_GOLD -> {
|
||||||
|
return "RV_Coin"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_CONVERT_GOLD_2_CASH -> {
|
||||||
|
return "RV_Exchange"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_BOX_TASK -> {
|
||||||
|
return "Benefit_Task"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_WITHDRAW_BIG -> {
|
||||||
|
return "RV_Accelerate2"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_WITHDRAW_SMALL -> {
|
||||||
|
return "RV_Accelerate1"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_DAILY_SIGN_SINGLE -> {
|
||||||
|
return "RV_Extra"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_DAILY_SIGN_DOUBLE -> {
|
||||||
|
return "RV_Double"
|
||||||
|
}
|
||||||
|
|
||||||
|
VidiConst.WATCH_AD_FOR_DAILY_SIGN_COMPLEMENT -> {
|
||||||
|
return "RV_SupplementarySigning"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return fromStr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.ama.core.architecture.util.setOnClickBatch
|
||||||
import com.ama.core.architecture.widget.BindingDialog
|
import com.ama.core.architecture.widget.BindingDialog
|
||||||
import com.gamedog.statisticreporter.StatisticUtil
|
import com.gamedog.statisticreporter.StatisticUtil
|
||||||
import com.gamedog.vididin.VidiConst
|
import com.gamedog.vididin.VidiConst
|
||||||
|
import com.gamedog.vididin.VidiStatisticHelper
|
||||||
import com.viddin.videos.free.databinding.DialogWatchVideoBinding
|
import com.viddin.videos.free.databinding.DialogWatchVideoBinding
|
||||||
import com.gamedog.vididin.router.Router
|
import com.gamedog.vididin.router.Router
|
||||||
|
|
||||||
|
|
@ -56,64 +57,12 @@ class WatchAdDialog(context: Activity, private val mWatchAdType: Int, statisticT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private fun getShowFromStr(watchAdType: Int): String {
|
|
||||||
val fromStr = ""
|
|
||||||
when (watchAdType) {
|
|
||||||
VidiConst.WATCH_AD_FOR_DAILY_WATCH_AD -> {
|
|
||||||
return "RV_VideoStream"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_DAILY_EARN_GOLD -> {
|
|
||||||
return "RV_Home_Menu"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_DAILY_WATCH_AD -> {
|
|
||||||
return "RV_Daily_Task"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_DAILY_EARN_GOLD -> {
|
|
||||||
return "RV_Coin"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_CONVERT_GOLD_2_CASH -> {
|
|
||||||
return "RV_Exchange"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_BOX_TASK -> {
|
|
||||||
return "Benefit_Task"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_WITHDRAW_BIG -> {
|
|
||||||
return "RV_Accelerate2"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_WITHDRAW_SMALL -> {
|
|
||||||
return "RV_Accelerate1"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_DAILY_SIGN_SINGLE -> {
|
|
||||||
return "RV_Extra"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_DAILY_SIGN_DOUBLE -> {
|
|
||||||
return "RV_Double"
|
|
||||||
}
|
|
||||||
|
|
||||||
VidiConst.WATCH_AD_FOR_DAILY_SIGN_COMPLEMENT -> {
|
|
||||||
return "RV_SupplementarySigning"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return fromStr
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun sendShowStatistic() {
|
private fun sendShowStatistic() {
|
||||||
StatisticUtil.reportEvents(StatisticUtil.KEY_RV_Button_Show, mapOf("Position" to getShowFromStr(mWatchAdType)))
|
StatisticUtil.reportEvents(StatisticUtil.KEY_RV_Button_Show, mapOf("Position" to VidiStatisticHelper.getShowFromStr(mWatchAdType)))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun sendClickStatistic() {
|
private fun sendClickStatistic() {
|
||||||
StatisticUtil.reportEvents(StatisticUtil.KEY_RV_Button_Click_Game, mapOf("Position" to getShowFromStr(mWatchAdType)))
|
StatisticUtil.reportEvents(StatisticUtil.KEY_RV_Button_Click_Game, mapOf("Position" to VidiStatisticHelper.getShowFromStr(mWatchAdType)))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun gotoWatchVideo() {
|
private fun gotoWatchVideo() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue