Commit 2e0f09d3 authored by mengcuiguang's avatar mengcuiguang

添加广告位

parent b9fb057f
......@@ -9,8 +9,8 @@ android {
applicationId "com.mints.goodmoney"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 6
versionName "1.0.5"
versionCode 7
versionName "1.0.6"
flavorDimensions "default"
// dex突破65535的限制
......@@ -239,7 +239,7 @@ dependencies {
implementation(name: 'wannuosili_ad_2.0.0', ext: 'aar')
// 瑞狮新闻
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
compile(name: 'xrsdk-release_tbs', ext: 'aar')
implementation(name: 'xrsdk-release_tbs', ext: 'aar')
// 枫岚
implementation(name: 'mh-adsdk', ext: 'aar')
implementation(name: 'mh-adsdk-ext', ext: 'aar')
......
......@@ -18,6 +18,7 @@ public class TtCsjAdManager {
/*banner*/
public static final String TT_AD_BANNER_MY = "945661050";// 个人中心
public static final String TT_AD_BANNER_JULEYUN = "945675532";// 聚乐云
/*激励视频*/
public static final String TT_AD_VEDIO_MAIN_DEV = "945561938";// 开发使用
......@@ -27,6 +28,7 @@ public class TtCsjAdManager {
public static final String TT_AD_VEDIO_TURNABLE = "945562039";// 大转盘
public static final String TT_AD_VEDIO_MOREDIALOG = "945562040";// 签到、气泡、离线弹框
public static final String TT_AD_VEDIO_GAME = "945562067";// 猎豹
public static final String TT_AD_VEDIO_JULEYUN = "945675529";// 聚乐云
/*信息流*/
public static final String TT_AD_NATIVEEXPRESS_AWARD = "945562047";//信息流弹窗
......@@ -41,6 +43,7 @@ public class TtCsjAdManager {
/*插屏广告*/
public static final String TT_AD_INSERT_LOADING_ID_LIEBAO = "945608874";//猎豹游戏加载时
public static final String TT_AD_INSERT_LOADING_ID_JULEYUN = "945675533";//聚乐云
private static boolean sInit;
......
......@@ -14,20 +14,26 @@ object YlhAdManager {
/* splash-postid */
const val YLH_AD_SPLASH_POSTID = "2081332802214692"
const val YLH_AD_SPLASH_POSTID = "7021944730189381"
/* vedio-postid */
const val YLH_AD_VEDIO_DRINK_POSTID = "2041542191534951" //喝水打卡
const val YLH_AD_VEDIO_MAIN_POSTID = "3091434802115910" //我的界面视频
const val YLH_AD_VEDIO_ERASE_POSTID = "4061637892217932" //挑战刮刮乐
const val YLH_AD_VEDIO_TURNABLE_POSTID = "5021539812411906" //大转盘
const val YLH_AD_VEDIO_MOREDIALOG_POSTID = "8081132842926080" //签到、气泡、离线弹框
const val YLH_AD_VEDIO_GAME_POSTID = "4021234882122091" //猎豹游戏
const val YLH_AD_VEDIO_DRINK_POSTID = "2031043750380462" //喝水打卡
const val YLH_AD_VEDIO_MAIN_POSTID = "8081940760988417" //我的界面视频
const val YLH_AD_VEDIO_ERASE_POSTID = "9061142700180449" //挑战刮刮乐
const val YLH_AD_VEDIO_TURNABLE_POSTID = "5051746700185561" //大转盘
const val YLH_AD_VEDIO_MOREDIALOG_POSTID = "9001346780383626" //签到、气泡、离线弹框
const val YLH_AD_VEDIO_GAME_POSTID = "9051646750686770" //猎豹游戏
const val YLH_AD_VEDIO_JULEYUN_POSTID = "1011746770898338" //聚乐云
/*信息流*/
const val YLH_AD_NATIVEEXPRESS_JULEYUN = "8041941770890627" //聚乐云
/* 插屏 */
const val YLH_AD_INTERSTITIALAD_LIEBAO = "5031044115480084" //猎豹
const val YLH_AD_INTERSTITIALAD_LIEBAO = "1021648750986824" //猎豹
const val YLH_AD_INTERSTITIALAD_JULEYUN = "4051047730890430" //聚乐云
/**
* 广告初始化
......
......@@ -29,6 +29,7 @@ import kotlinx.android.synthetic.main.activity_award.*
import java.math.BigDecimal
import java.util.*
import kotlin.collections.ArrayList
import kotlin.concurrent.schedule
/**
......@@ -61,6 +62,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
initExpress()
initListener()
initDataView()
judgeAppInfo()
}
......@@ -98,9 +100,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 黑名单
awardPresenter.saveTerminalInfo()
carrierType = Constant.CARRIER_BLACK
} else {
initDataView()
}
pushAward()
}
})
}
......@@ -117,9 +118,15 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 开启3秒倒计时
startTime()
pushUmengEvent()
}
/**
* 发放奖励
*/
private fun pushAward() {
when (carrierType) {
Constant.CARRIER_GAME_ONLINE, Constant.CARRIER_EATMEAL -> {
Constant.CARRIER_GAME_ONLINE, Constant.CARRIER_EATMEAL,
Constant.CARRIER_RUISHINEWS_CHALLANGE -> {
val vo = HashMap<String, Any>()
vo["carrierType"] = carrierType
awardPresenter.reportAddCoinMsg(vo)
......@@ -189,6 +196,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
}
Constant.CARRIER_ZHANGYUE -> {
tvAwardContent.setText("阅读奖励${curCoin}金币")
tvAwardNext.setText("领取金币")
}
Constant.CARRIER_SIGNIN_HOMEPAGE_AWARD -> {
tvAwardContent.setText("签到奖励${curCoin}金币")
......@@ -213,9 +221,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardNext.visibility = View.GONE
tvAwardHint.visibility = View.GONE
}
Constant.CARRIER_VERSUS_VIDEO -> {
tvAwardContent.setText("${curCoin}金币已到账")
}
Constant.CARRIER_CHALLENGE_TURN, Constant.CARRIER_CHALLENGE_CARD,
Constant.CARRIER_WALK_BUBBLE, Constant.CARRIER_EATMEAL_SUBSIDY,
Constant.CARRIER_WALK, Constant.CARRIER_HOMEWATER -> {
......@@ -224,6 +229,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
}
else -> {
tvAwardContent.setText("${curCoin}金币已到账")
tvAwardNext.setText("领取金币")
}
}
}
......@@ -284,6 +290,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
e.printStackTrace()
}
SoundPoolUtil.getInstance().onDestory()
TTPreLoadExpressManager.getInstance().onDestroy()
flAwardAd?.removeAllViews()
vedioAdingManager.setVedioAdingListener(null)
......
......@@ -50,7 +50,7 @@ public class SoundPoolUtil {
}
}
public void destoryGoldVoice() {
public void onDestory() {
if (player != null) {
player.stop();
player.release();
......
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