Commit 2e0f09d3 authored by mengcuiguang's avatar mengcuiguang

添加广告位

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